在oracle中一张表为模板创建另外一张表,但不要复制表里面的内容!

来源:百度知道 编辑:UC知道 时间:2024/05/12 00:02:17

这样就好了!

select top 0 * into mytest from 表

如果oracle没有top这个属性那么就更好办了!

select * into mytest from 表 where id=122115--写一个不存在的条件

ok

要想快速节省时间的话就这么弄

create table2(新表) as select * from table1(旧表) where rownum=1;
truncate table table2;
用不上几秒钟,两句一起执行好了