select cust_no1,cust_name1,cust_cardno1,cust_no,cust_name,cust_cardno
from xj_cust where
where xcust_no1 not in (select cust_no from mx_cust)
and cust_no like 'c%'
from xj_cust where
where xcust_no1 not in (select cust_no from mx_cust)
and cust_no like 'c%'
from xj_cust
where cust_no1 not in (select cust_no from mx_cust)
and cust_no like 'c%'from xj_cust
一个表吗?感谢 !
from xj_cust,mx_cust
where xj_cust.cust_no1<>mx_cust.cust_no
and xj_cust.cust_name1<>mx_cust.cust_name
and cust_no like 'c%'
试试这个!
table_a:a,b,ctable_b:a,d,e,f尽管有 相同的 字段 a,但还是会选择出来。因为 a.a<>b.d,a.b<>b.a。
所以语句应该是
SELECT * FROM X WHERE X.A NOT IN (SELECT A FROM Y)
WHERE X.B LIKE '%SA%'