DBAsupport.com Forums - Powered by vBulletin
Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2006

    refrential Integrity

    i have put Foreign key constraint on my table with " on delete set null " option but when i am deleting the record in parent table it is giving me error - " can not update table.col to null ".

    ALTER TABLE binoy
    ADD ( FOREIGN KEY (deptno)
    REFERENCES deptno on delete set null)

    delete from deptno where deptno=10

    ERROR at line 1:
    ORA-01407: cannot update ("BINOY"."DEPTNO") to NULL

  2. #2
    Join Date
    Sep 2002
    is the column set to not null

  3. #3
    Join Date
    Feb 2006

    Referential Integrity

    it was not set to null when table was created untill i put foreign key constraint on the column...

  4. #4
    Join Date
    Mar 2007
    Ft. Lauderdale, FL
    please desc table
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.