企业增资验资网

企业增资验资网

多表查询语法

来源:互联网 知识问答 10

多表关联查询语法分为 内、外连接。

外连接分为左连接(left join 或left outer join)、右连接(right join 或者 right outer join)、和完整外部连接 (full join 或者 full outer join)

左连接:select * from table1 left join table2 on table1.条件列名 = table2.条件列名

右连接:select *from table1 right join table2 on table1. 条件列= table2.条件列

完全外部连接:select *fron table1 join table2 on table1.条件列名 = table2.条件列名

交叉连接(完全):select *from table1 cross join table。

多表查询

抱歉,评论功能暂时关闭!