ORACLE CTAS使用注意点分析和总结.docxVIP

  • 6
  • 0
  • 约2.89千字
  • 约 3页
  • 2023-09-25 发布于上海
  • 举报
ORACLE CTAS(create table as select)使用注意点 看到这 篇文章 Beware of default values when using CTAS,关于create table as select (CTAS)值得注意的地方:使用这条sql 创建的表不会带默认值。 操作以下实验证明之: scott@TICKET; create table p 2 ( id number primary key , 3 username varchar(25) , 4 passwd varchar(24), 5 email varchar(30), 6 birth date, 7 tel number , 8 sex char(1)); 表已创建。 scott@TICKET; alter table p add age number ; 表已更改。 创建一个唯一约束 scott@TICKET; alter table p modify tel unique; 表已更改。 创建一个检查约束 scott@TICKET; alter table p add constraint p_ck_age check(age;0 and age;150); 表已更改。创建一个默认约束 scott@TICKET; alter table p modify sex default 0;

文档评论(0)

1亿VIP精品文档

相关文档