首页 > 试题广场 >

【单选】下面哪个SQL语句可以查询出“id存在于A表中,但不

[不定项选择题]
【单选】下面哪个SQL语句可以查询出“id存在于A表中,但不存在于B表”的数据?
  • select A.* from A join B on A.id=B.id where B.id is null;
  • select A.* from A left outer join B on A.id=B.id where B.id is null;
  • select A.* from A right outer join B on A.id=B.id where B.id is null;
  • select A.* from A inner join B on A.id=B.id where B.id is null;

outer是产生并集 inner是交际。right是以右边为标准左边带空。left是以左边为标准右边带空

发表于 2018-09-24 23:40:59 回复(0)
没有指明inner还是outer时候默认是inner
发表于 2019-08-26 15:49:26 回复(0)