1、数据库建表语句
create table tb_People(id integer primary key, Name varchar(255), Sex varchar(255))
2、同数据库拷贝数据表
sql:
insert into table1 select*from table2(完全拷贝)
insert into table1 select distinct*from table2(不重复拷贝);
insert into table1 select top 10*from table2(前10条拷贝)
3、不在同一数据库中数据表拷贝
DB1、DB2为两个数据库,tb_boy、tb_girl分别为前两个数据库的表
sql:
insert into DB1.tb_boy select*from DB2.tb_girl
insert into DB1.tb_boy select*from DB2.tb_girl(完全拷贝)
insert into DB1.tb_boy select distinct*from DB2.tb_girl(不重复拷贝);
insert into DB1.tb_boy select top 10*from DB2.tb_girl(前10条拷贝)