select a,b,c
into table2
from table1select c,d,e,f
into table3
from table1select g,h,i,j,k
into table4
from table1
into table2
from table1select c,d,e,f
into table3
from table1select g,h,i,j,k
into table4
from table1
解决方案 »
- SQL Pivot 函数
- 回杭州老家找份软件开发工作
- 问一个简单语句
- SQL2005 简单代码求助
- SQL WHERE里面如何使用 replace函数?
- SQL用分隔符VALUES分割 获得TEXT 问题补充
- sql查詢無返回結果能否令某字段直接為0
- sqlserver有没有像oracle中的rownum东西,如果没有如何解决?
- 当#temp_plan的Product_id在#Result_Table没有时,怎样将#temp_plan的Product_id插入到#Result_Table中
- 急用:SQL语句如何搜索HTML页面内容--在线等待
- 更新相关内容的问题!
- 系统日志怎么做?要建什么字段?
select a,b,c into Table2 from Table1
select c,d,e,f into Table3 from Table1
select g,h,i,j,k into Table4 from Table1
drop table Table1
这种方法会丢掉字段上的DEFAULT等一切约束。方法2、导出脚本->修改脚本成为Table2、Table3、Table4的建表脚本->执行脚本建表->运行以下语句:
insert Table2 select a,b,c from Table1
insert Table3 select c,d,e,f from Table1
insert Table4 select g,h,i,j,k from Table1
drop table Table1