约束:
主键约束: alter table table_name add constraint pk_name primary key(column1); 外键约束: alter table table_name add constraint fk_name foreign key(column1) references table_2(column1); check约束: alter table table_name add constraint ck_name_sex check(sex='男' or sex='女') ;
select * from dba_constraints select * from user_constraint
CREATE UNIQUE INDEX INDEX_T_NAME ON TABLE_NAME(COLUMNS);--唯一索引 CREATE BITMAP INDEX BIT_TABLE_NAME ON TABLE_NAME(SEX);--位图索引 |
原文:http://leafnode.blog.ccidnet.com/blog-htm-itemid-133496-do-showone-type-blog-uid-43034.html
阅读(215) | 评论(0) | 转发(0) |