mysql多表查询

mysql多表查询

表的集合运算

并集union

交集interset

差集except

union和union all,union all不去重

联合查询

select * from staff inner join market

on staff.sid=market.sid;

 

select * from

staff

inner join market

using(sid);

两种一样

 

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: