卡通小狗头像简笔画:求多个表交集的SQL语句是什么呀???

来源:百度文库 编辑:神马品牌网 时间:2024/05/07 04:29:57

select a.*,b.* from table1 as a left join table2 as b on a.id=b.id

以左侧表为基准,也可以使用right以右侧表为基准

select xxx.a1,yyy.b1 from xxx, yyy where xxx.a2=yyy.b2

select 表.字段 from 表1,表2 where 表1.字段1=表2.字段2

(子查询)union(子查询)

(子查询)and(子查询)

不明白,是指两个表的相同记录的交,还是主键相同的交,还是其他情况?得说明白了