|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
|
|
#1
|
|||
|
|||
|
CREATE TABLE addresses OF address
( houseNum PRIMARY KEY ); This is how I create a primary key when creating a table. Does anyone know how I would create a primary key using both the house number and say the telephone number (ie. telNo), which in effect would be a composite key???? |
|
#2
|
|||
|
|||
|
create table addresses (
houseNum NUMBER, telNo NUMBER, constraint pk_address primary key (houseNum,telNo) ) Regards, Dan |
|
#3
|
|||
|
|||
|
That gives me this error:-
SP2-0734: unknown command beginning "constraint..." - rest of line ignored. SP2-0042: unknown command ")" - rest of line ignored. Its like as if it doesnt recogise the word "constraint" ??????? |
|
#4
|
|||
|
|||
|
Its okay, I got it!
Thanks, you were right, with a little adjustment of the syntax. |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > Creating a Composite Key..... |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|