SQL子查询、多表查询、联合查询

1、select * from ta1 where id in (select id form tb2 where ... )
属于“子查询”。
2、select ta1.*, ta2.* from tab1, tab2 where ta1.[字段]=ta2.[字段]
属于“多表查询”。
3、如:(select * from ta1 where ...) union (select * from ta2 where ...)
属于“联合查询”,

猜你喜欢

转载自blog.csdn.net/qq_36514705/article/details/81271103