这个SQL 怎么写 有一个A表 字段 A1 A2 A3 A4 A1 A2是联合主键有一个B表 字段 B1 B2 B3 B4 现在有个需求: 从A表检索数据 要求 A1 A2 不在 B表中 A1=B1 A2=B2这个语句怎么写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 select * from A where not exists (select 1 from B where a.a1=b.b1 and a.a2=b.b2) select * from a where not exists(select 1 from b where A1=B1 A2=B2)--orselect * from a where (a1,a2)not in (select (b1,b2) from b where A1=B1 A2=B2) select a.* from @a a LEFT JOIN @b bON a.a1=b.b1 AND a.a2=b.b2WHERE b.b1 IS NULL 新手求助vm安装问题 问下这1个语句是什么意思啊? 。。。在线等!!!! jobs 不能自动运行 求助,关于Oracle 11g 存储过程,调用ftp.put上传文件 求此查询语句写法。 oracle 精度问题 oracle 中 SQL PLUS环境中使用某个数据库用什么命令啊 新手问题,请问oracle中的全局数据库有什么用啊? 错误:“ORA-02089:COMMIT不允许在附属会话中” sql语句怎么写 oracle升级问题? 如何简便地将一台机器上的oracle数据库迁移到另一台机器上
select * from a where not exists(select 1 from b where A1=B1 A2=B2)--or
select * from a where (a1,a2)not in (select (b1,b2) from b where A1=B1 A2=B2)
ON a.a1=b.b1 AND a.a2=b.b2
WHERE b.b1 IS NULL