数据查询有关问题

数据查询问题有表A,表B.查询当表B没有符合表A的存在记录!而我又想保留表B的字段该如何查询?[解决办法]sele

数据查询问题
有表A,表B.查询当表B没有符合表A的存在记录!而我又想保留表B的字段该如何查询?

[解决办法]
select B.* from B where not exists (select 1 from A where A.col = B.col);
[解决办法]

SQL code
或ID為主健select * from A where ID not in(select ID from B)go如果結構相同select * from Aminusselect * from B