English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

ADD (CONSTRAINT STOCKCODE_FK Foreign Key (stockcode)
References Stock
(stockcode) ON DELETE SET NULL ON UPDATE CASCADE)):

ERROR at line 2:
ORA-00907: missing right parenthesis
SQL>

Please re-write it correctly for me. THANKS

2006-07-02 23:23:29 · 6 answers · asked by Anonymous in Computers & Internet Programming & Design

6 answers

ADD (CONSTRAINT STOCKCODE_FK Foreign Key (stockcode)
References Stock
(stockcode) ON DELETE SET NULL ON UPDATE CASCADE):

Ans: Delete the last parenthesis on the last line, you had an extra parenthesis here.

2006-07-02 23:28:52 · answer #1 · answered by dinuksw 3 · 1 0

ADD (CONSTRAINT STOCKCODE_FK Foreign Key (stockcode)
References Stock
(stockcode) ON DELETE SET NULL ON UPDATE CASCADE).

Try this?

2006-07-02 23:27:17 · answer #2 · answered by A_GUY_IN_JEANS 1 · 0 0

ADD ((CONSTRAINT STOCKCODE_FK
Foreign Key (stockcode)
References Stock (stockcode)
ON DELETE SET NULL
ON UPDATE CASCADE)):

2006-07-02 23:31:32 · answer #3 · answered by n9flyboy 4 · 0 0

the syntax should look like this " ALTER table_name ADD CONSTRAINT SPECIFICATIONS" there should be no parenthesis for constraint "ADD ( Constraint" the "(" is wrong way of command
if you are using other than oracle or MS SQL. for oracle and ms sql the command should work properly with Alter table table_name prefixed before the add constraint

2006-07-02 23:29:32 · answer #4 · answered by sjilumudi 2 · 0 0

If you look @ your code the answer is right in front of you my friend. Look at right hand side of your code and see you have (stockcode) parenthesis but you also have parenthesis in front of code.

2006-07-02 23:30:45 · answer #5 · answered by Joe_Young 6 · 0 0

its seems that you are missing right parenthesis you will need a right parenthesis for your code to work
:-) good luck

2006-07-02 23:26:05 · answer #6 · answered by Anonymous · 0 0

fedest.com, questions and answers