1 create table a as select * from emp where 1=2;
2 insert into a select * from emp where sal>2000;
3 复制表不能复制表的约束
4 如果只复制表的结构不复制表的数据则这上面的几句如何理解呀,在线等 thanks

解决方案 »

  1.   

    1:复制表结构。不带数据
    2:把薪水大于2000的导入a 表。
    3:约束不能复制的。要在新表a上新建。
    4:create table a as select * from emp 数据和表同复制
      

  2.   

    1 create table a as select * from emp where 1=2;------只复制表,不包括数据
    2 insert into a select * from emp where sal>2000;  把SAL大于2000的数据插入到A
    3 复制表不能复制表的约束 --------复制的时候,约束需要手工建,复制不过来
    4 如果只复制表的结构不复制表的数据则
      

  3.   

    1 create table a as select * from emp where 1=2;------只复制表,不包括数据
    2 insert into a select * from emp where sal>2000; 把SAL大于2000的数据插入到A
    3 复制表不能复制表的约束 --------复制的时候,约束需要手工建,复制不过来
    4 如果只复制表的结构不复制表的数据则执行这句
      create table a as select * from emp where 1=2;