sonnyk2016
sonnyk2016

Reputation: 111

Oracle SQL statement error - ORA-00905: missing keyword

Can someone please help me with the following Oracle SQL Statement. I am getting an error:

ORA-00905: missing keyword

ALTER TABLE loan_transaction_codes 
 ADD FOREIGN KEY (non_accrual_debit_code) 
   REFERENCES dbo.general_ledger_accounts (gl_account_no) 
   ON UPDATE NO ACTION 
   ON DELETE NO ACTION

Upvotes: 0

Views: 960

Answers (1)

user5683823
user5683823

Reputation:

Oracle Database does not have an ON UPDATE clause in referential constraint syntax, it only has an ON DELETE (optional) clause; and the only options for ON DELETE are CASCADE and SET NULL, there is no NO ACTION option. Please refer to the Oracle documentation, which is very easy to find and read.

Upvotes: 2

Related Questions