Home » SQL & PL/SQL » SQL & PL/SQL » ora-00900 (10gR2.Windows)
ora-00900 [message #312626] Wed, 09 April 2008 08:35 Go to next message
plshelp
Messages: 205
Registered: January 2007
Senior Member
Hi experts,

I am trying to add a column company to the existing table and this column will be a primary key and a foreign key, but not sure how to find out to which table its a foreign key for.
I have added the column as not null, added constraint for pk and the unique index. But I get 'ORA-00900:invalid SQL statement' when I execute the below query to add the foreign key constraint.

alter table cash_batch add (
constraint cmpdef_comp_cashbatch_fk foreign key (company)
references cmpdef(company));
);

Any suggestions?

Thank you
Re: ora-00900 [message #312630 is a reply to message #312626] Wed, 09 April 2008 08:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68722
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
");" is an invalid statement.

Regards
Michel
Re: ora-00900 [message #312631 is a reply to message #312626] Wed, 09 April 2008 08:38 Go to previous message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Any suggestions?
Use valid syntax & make sure the parenthesis match
Previous Topic: repalce the first occurance of a character
Next Topic: error in procedure code
Goto Forum:
  


Current Time: Tue Dec 10 03:04:26 CST 2024