//利用已存在的customer表来创建 customer2表
oracle :
create table customer2 as select * from customer
mssql:
select
mysql:
同oracle
create table customer2 as select * from customer(本人亲测可以用)
//如果是要生成指定的列名呢请看 (这里只介绍oracle的,语法上掌握以后,原理是一样的)
若只有customer的id和name字段并且在customer2中表结构是(cid,c_name);
那么可以这么写
可以看出只是指定别名而已
(亲测)
mysql:create table customer2 as select id as cid from customer;
mssql:select customer.id into customer2 from customer;