27,579
社区成员
发帖
与我相关
我的任务
分享
IF(SELECT COUNT(*)FROM TABLEB T WHERE NOT EXISTS(SELECT 1 FROM TABLEA WHERE COL1=T.COL1 AND COL2=T.COL2))=0
PRINT '包含'
ELSE
PRINT'不包含'
SELECT t1.* FROM test1 t1
LEFT JOIN test2 t2
ON t1.id = t2.id
WHERE t2.ID IS NULL
if ( (select count(1) from tableA where exists (select * from tableB)) =(select count(1) from tableB))
print '相等'
else
print '不相等'
SELECT * FROM TABLEB T WHERE NOT EXISTS(SELECT 1 FROM TABLEA WHERE COL1=T.COL1 AND COL2=T.COL2)
?