mysql的联合查询

上一篇 / 下一篇  2018-07-13 14:07:27 / 个人分类:其他

mysql不支持full join的语法,可以支持下面的查询。
SELECT aws.*,cases.* from aws LEFT JOIN cases on aws.id = cases.aw_id

SELECT aws.*,cases.* from aws RIGHT JOIN cases on aws.id = cases.aw_id

SELECT aws.*,cases.* from aws JOIN cases on aws.id = cases.aw_id

SELECT aws.*,cases.* from aws INNER JOIN cases on aws.id = cases.aw_id

SELECT aws.*,cases.* from aws LEFT JOIN cases on aws.id = cases.aw_id UNION SELECT aws.*,cases.* from aws RIGHT JOIN cases on aws.id = cases.aw_id

SELECT aws.*,cases.* from aws,cases WHERE aws.id = cases.aw_id

TAG: SQL sql

引用 删除 2243148804   /   2018-08-23 16:49:28
没明白这些语句是什么意思
 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

Open Toolbar