--mysql下建立表结构 ,oracle不支持like
create table tba1 as select * from tba;
or
create table tba1 like tba;
--结论:mysql下create table a as select * from b形式创建的表不包含索引信息,
--like子句形式包含完整表结构和索引信息
--所以 as select 子句一般适用于建表并复制源表数据的情况,
--like子句适用于只复制表结构的情况
--sql server下复制表结构 tb为新表
select * into tb from tba where 1 <>1
or
select top 0 * into tc from tba;
--sql server下插入一个表的数据
insert into tb select * from tba;
--select into是快过insert into很多的
insert into tb values(2,'java');
insert into tb select 2,'java' ;
http://wmcxy.iteye.com/blog/1137179
http://alovejun.iteye.com/blog/1113876
http://bbs.chinaunix.net/thread-1597260-1-1.html
http://topic.youkuaiyun.com/u/20091007/17/12d4404e-278b-42cb-9ad5-bdcf161e3855.html