[mysql]SQL查询存在A表但不存在B表的数据
时间: 2019-07-19来源:OSCHINA
前景提要
【围观】麒麟芯片遭打压成绝版,华为亿元投入又砸向了哪里?>>>
select * from ti_road_node_code a where a.road_node_id not in ( select en_road_node_id from ti_road_node_relation b) 15毫秒
select * from ti_road_node_code a left join ti_road_node_relation b where a.road_node_id =en_road_node_id and isnull(b.ex_road_node_id) - 报错
select a.* from ti_road_node_code a left join ti_road_node_relation b on a.road_node_id =b.en_road_node_id where isnull(b.ex_road_node_id) 282毫秒 select a.* from ti_road_node_code a left join ti_road_node_relation b on a.road_node_id =b.en_road_node_id where isnull(b.en_road_node_id) 一样
SELECT a.* FROM ti_road_node_code a WHERE NOT EXISTS (SELECT 1 FROM ti_road_node_relation b WHERE b.en_road_node_id = a.road_node_id) 540毫秒 https://blog.csdn.net/a3060858469/article/details/79651428

科技资讯:

科技学院:

科技百科:

科技书籍:

网站大全:

软件大全:

热门排行