===查詢數據庫問題==== 我有2張表,表a有字端a1 a2 1 q 2 w3 e4 r 表b有字端b1 b2 q 飛機w 飛機查出的內容為b1中沒有的a2如;a1 a2 b23 e 飛機4 r 飛機如何得到這樣的結果,忘高手指教 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 两种方法:1.not in2.left join …… is null select a.*,'飛機' as b2from a left join bon a.a2=b.b1where b.b1 is null select * from b where b1 not in(select a2 from a) 第3中办法not existsselect a.*,'飛機' as b2from a where not exists (select 1 from bwhere a.a2=b.b1) 1433端口打不开,请问可能是什么原因引起的呢? SQLServer2005SP2-KB921896-x86-CHS这个可以用在所有版本的sql 2005上吗? 存储过程出错! 数据库冲突? 新手请教关于触发器运作情况的问题 存储过程参数 在数据库技术中面向对象数据模型是一种(),请高人求求我,Help me!!! Oracle 組件問題!!!SOS!SOS!SOS! 在数据录入是的一个问题?高手请指点 行列转换,挑战一下哇 用SQL语句实现数据远程导入SQL的问题 SQL Server 2000远程连接问题
from a left join b
on a.a2=b.b1
where b.b1 is null
not existsselect a.*,'飛機' as b2
from a
where not exists (
select 1 from b
where a.a2=b.b1
)