文字版:
select * from test01,test02 where test01.myname=test02.myname
--select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='test02')
select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='test01')
and name not in(select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='test02'))
select * from test01 where not exists(select * from test02 where test01.myname=test02.myname)
select * from test01 where (select count(1) as num from test02 where test01.myname=test02.myname) = 0
--select * from test01 left join test02 on test01.myname=test02.myname
select * from test01 left join test02 on test01.myname=test02.myname where test02.myname is null
原图:https://code.aliyun.com/hi31588535/outside_chain/raw/master/test.png