怎么查询左连接中某字段为空的记录?素闻此地藏龙卧虎,请出手

如何查询左连接中某字段为空的记录?素闻此地藏龙卧虎,请出手!
可以实现了左连接,但有些记录为空,需要查询出来,请问如何实现呢?

------解决方案--------------------
select a.*,b.* from table1 a left join table2 b
on a.id = b.id
where b.colname is null

------解决方案--------------------
沒看明白樓主的意思
------解决方案--------------------
大概就是星星点灯 那个意思
------解决方案--------------------
查出为空的记录?
在条件后加:XX is null
------解决方案--------------------
可能就是这意思吧...
------解决方案--------------------
我是来看龙和虎的
------解决方案--------------------
comszsoft(星星点灯)
正解
------解决方案--------------------
select * from table1 a right join
(
select * from table2 where b.colname is null
) b
on a.id = b.id

效率高点
------解决方案--------------------
嗯啦
------解决方案--------------------
SELECT *
FROM a
WHERE a.id NOT IN(SELECT id FROM b)