这个字段怎么设置(oracle)
我想让数据库sms_tp里的字段content,里面不允许有重复的内容是不是把他设置成primary key就可以了,怎么设置呢.还是设置成其他的呢! 问题点数:20、回复次数:10Top
1 楼alexdream(阿辛)回复于 2002-05-23 12:45:07 得分 0
忘记说了,我这个字段已经存在Top
2 楼jlandzpa(jlandzpa)回复于 2002-05-23 12:57:32 得分 0
唯一索引亦可Top
3 楼bzszp(SongZip)回复于 2002-05-23 13:09:36 得分 0
用企业管理器设置Top
4 楼bzszp(SongZip)回复于 2002-05-23 13:10:38 得分 0
用企业管理器设置Top
5 楼alexdream(阿辛)回复于 2002-05-23 13:14:39 得分 0
具体点用sqlplus怎么弄呢Top
6 楼alexdream(阿辛)回复于 2002-05-23 13:37:48 得分 0
谢谢Top
7 楼alexdream(阿辛)回复于 2002-05-23 13:50:09 得分 0
再谢Top
8 楼tomcat1022(执着)回复于 2002-05-23 14:13:09 得分 20
alter table table_name modify filedname datatype unique .
this statement is error. because at here we can not add constrainct .
So I think that the only way create trigger before update, insert on this table . sorry . I can not think out some good idea to hlep youTop
9 楼tomcat1022(执着)回复于 2002-05-23 14:21:09 得分 0
oh you can implement it by PL/SQL DevelopeTop
10 楼tomcat1022(执着)回复于 2002-05-23 14:37:19 得分 0
but you will lose the data of this table. please save the data before do itTop
11 楼lws0472(期待2008)回复于 2002-05-23 14:43:23 得分 0
要建主键,但建主键时该字段不能为空Top




