|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
1200+ fellow developers rate and compare features of the top IDEs, like Visual Studio, Eclipse, RAD, Delphi and others, across 13 categories. Enjoy this FREE Download of the IDE User Satisfaction Study by Evans Data Corporation. Download Now!
|
|
#1
|
|||
|
|||
|
foreign key problem
if someone can help me in this now
I have an error , i want to make a foreign key but it is not working SQL> create table violation (violation_no number(5) constraint violation_no primary key, 2 violation_type varchar2(20), place_of_violation varchar2(10), 3 date_of_violation date, violation_status varchar2(10), license_no number(7) constraint license_ no foreign key, vehicle_no number(15) constraint vehicle_no foreign key, money_to_pay number(5)); date_of_violation date, violation_status varchar2(10), license_no number(7) constraint license_no fo * ERROR at line 3: ORA-02253: constraint specification not allowed here Last edited by peaceful_girl : March 16th, 2004 at 07:41 AM. |
|
#2
|
|||
|
|||
|
You need to specify what each column references table(column)
I would recommend taking out all of the FK pieces in your table create syntax and go back in and manually adding them. ALTER TABLE table name ADD CONSTRAINT FK_constraint_name foreign key(column_name) references other table(column_name); |
![]() |
| Viewing: Dev Shed Forums > Databases > Oracle Development > foreign key problem |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|