ITPub博客

首页 > 应用开发 > IT综合 > constraint=constraints?

constraint=constraints?

原创 IT综合 作者:warehouse 时间:2008-03-26 21:15:29 0 删除 编辑

偶然发现在为字段增加约束时使用constraint或者constraints都可以创建成功,查看oracle语法发现是constraint,不知道是否是bug?

[@more@]

SQL> create table t(id int primary key);

表已创建。


SQL> create table tt(id int);

表已创建。


SQL> alter table tt add constraint fk_tt foreign key (id) references t(id);

表已更改。

SQL> alter table tt drop constraint fk_tt;

表已更改。

SQL> alter table tt add constraints fk_tt foreign key (id) references t(id);

表已更改。

SQL>

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/19602/viewspace-1001522/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-07

  • 博文量
    717
  • 访问量
    5366324