[求助]什么叫联合查询,联接查询?
如题,还有子查询这3者之间有什么联系和区别,麻烦大家先解释下概念再分析一下区别谢谢~~
1.联合查询
select column1,column2,...,columnn from tablename1
union --or union all
select column1,column2,...,columnn from tablename2
..........
2.联接查询
select tablename1.column1,tablename1.column2,...tablename1.columnn,tablename2.column1,...tablaname2.columnn
from tablename1 inner join --full join,left join,right join,cross join...
tablename2
on ....
3.子查询
select
...,
(select columnname .... from tablename1....)
from tablename2...
这些都是应该自己查联机的东西