alter table primprod add constraint primprod_pk primary key(INDEXNAME);
解决方案 »
- 请教一个求连续日期的天数的问题
- 更改表空间的影响
- Oracle实例无法启动(提示1058错误)
- oracle存储过程问题,急需解决,谢谢各位大虾!
- .net连接oracle
- SQL SERVER2000数据导入oracle9i
- 如何在sqlplus下声明一个日期变量================================?
- 怎么把dbf文件导入到Oracle数据库中啊?(急!!!!!)
- 查询时出现,尤其是用order by 时?请问这是什么问题,如何解决??在线等ing?
- 初学者请教的问题,请大家多多指教。。。
- 各位大虾,怎么在oracle创建触发器啊,(oracle的工具)
- 高手们来看看,这样的视图怎么建???
add constrain constrain_name
primary key(indexname);
alter table primprod add constraint primprod_pk primary key(INDEXNAME)
*
ERROR at line 1:
ORA-02260: table can have only one primary key
系统报错如上。开始,我也是那样写的。
add constrain constrain_name
primary key(indexname);
alter table primprod drop cascade constraint
*
ERROR at line 1:
ORA-00905: missing keyword出错。真不知道怎么办,老是出错!!!!!!!!
---------- ---------- --------------------
1 1 hello
1 2 worldSQL> alter table test drop constraint pk_test;表已更改。
SQL> desc test
名称 空? 类型
----------------------------------------- -------- ----------------------------
PR1 NOT NULL NUMBER
PR2 NOT NULL NUMBER
SRC VARCHAR2(20)SQL> insert into test values(1,1,'hello');已创建 1 行。SQL> insert into test values(1,2,'world');已创建 1 行。SQL> select * from test; PR1 PR2 SRC
---------- ---------- --------------------
1 1 hello
1 2 worldSQL> alter table test drop constraint pk_test;表已更改。SQL> select * from test; PR1 PR2 SRC
---------- ---------- --------------------
1 1 hello
1 2 worldSQL> desc test;
名称 空? 类型
----------------------------------------- -------- ----------------------------
PR1 NUMBER
PR2 NUMBER
SRC VARCHAR2(20)