一个表的字段存在或者不存在另一表里

select t.*, t.rowid from a_gys t,mms_gys b where t.gys=b.gysmc for update

select * from a_gys t where not exists (select * from mms_gys b where t.gys=b.gysmc)

posted @ 2015-08-31 17:28  飛燕88  阅读(105)  评论(0编辑  收藏  举报