QQ网名大全

如何创建和table1 除了名字外 其他字段主键完全一样的 table2 的表?

oracle的话
create table2 as select * from table1 where 1<>1  --这个是只复制表结构
create table2 as select * from table1 --这个是复制表结构加数据
 
sqlserver
select * into table2 from table1 where 1<>1 --复制表结构
select * into table2 from table1 --表结构+数据
佚名
2024-05-29 16:03:44
最佳回答
类似问题(10)