首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

create table的小疑点

2012-04-25 
create table的小问题,在线等1 create table a as select * from emp where 122 insert into a select *

create table的小问题,在线等
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:复制表结构。不带数据
2:把薪水大于2000的导入a 表。
3:约束不能复制的。要在新表a上新建。
4:create table a as select * from emp 数据和表同复制
[解决办法]
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 如果只复制表的结构不复制表的数据则

[解决办法]
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;


[解决办法]

探讨

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 如果只复制表的结构不复制表的数据则执行……

热点排行
Bad Request.