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: 64151
Registered: March 2007
Location: Nanterre, France, http://...
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: 25050
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: Fri Dec 09 17:08:19 CST 2016

Total time taken to generate the page: 0.14664 seconds