大西洋底的来客:sql select语句在不同表选择多条记录

来源:百度文库 编辑:查人人中国名人网 时间:2024/04/28 12:16:05
select语句如何选择多个表中的记录?表是相同结构的。
感激不尽
能不能创新这个新表?语句是?

select * into 新表名 from
(
select * from A
union all
select * from B
union all
select * from C
)nt

select * from A

union

select * from B

SELECT * FROM A INNER JOIN B ON A.[P_ID]=B.[F_ID]