Unique constraints [message #251420] |
Fri, 13 July 2007 09:21 |
swapnajojo
Messages: 40 Registered: June 2007 Location: India
|
Member |
|
|
Is it possible to deine unique key on two columns in a table
For eg:
SQL> ED
Wrote file afiedt.buf
1 create table inter_un00(checkno number(2) constraint un_con1 unique,NEWCOL VARCHAR2(40) CONSTRAINT UN_CONS00
2* UNIQUE ,NAME VARCHAR2(78))
SQL> /
SQL> ED
Wrote file afiedt.buf
Table created.
Is this correct .
I have read in oracle Documention the following
"Restrictions on Unique Constraints
A table or view can have only one unique key."
|
|
|
|
|
|
|
Re: Unique constraints [message #251449 is a reply to message #251420] |
Fri, 13 July 2007 11:26 |
joy_division
Messages: 4963 Registered: February 2005 Location: East Coast USA
|
Senior Member |
|
|
swapnajojo wrote on Fri, 13 July 2007 10:21 |
"Restrictions on Unique Constraints
A table or view can have only one unique key."
|
I remember seeing this some time ago in the past. It is definitely a mistake in the documentation (but I do remember seeing it in the official Oracle documentation). I would hope they have fixed it in the 10g documentation.
|
|
|
|
|
|