*****请帮助:如何拷贝一个空的结构及如何把几列合并成一列?谢谢!*****

请教2个问题:
1.如何生成一个与原有表的结构一样的空库?(不用导入导出方法)
2.如何把一个表的几列合并为一列?
例如 table a(colum1,colum2,colum3)
table b(col1,col2,col3,col4)
col1=colum1+colum2
谢谢各位!
---------------------------------------------------------------

1. create table

1<tablename> as select * from &lt;原有表&gt; where 1 = 0   
22\. create table <tablename> as select colum1+colum2 col1 , colunm2 ,column3 , column4 from a where 1 = 0</tablename></tablename>
Published At
Categories with 数据库类
Tagged with
comments powered by Disqus