0
votes

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
1

1 Answers

2
votes

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.