Results 1 to 2 of 2

Thread: Help: Error Message "ADD CONSTRAINT" ...

  1. #1
    Join Date
    Oct 2005
    Location
    Hamburg - GER
    Posts
    1

    Question Help: Error Message "ADD CONSTRAINT" ...

    Hi guys,
    I get a syntax error when I want to execute the following SQL statement :

    ALTER TABLE tbl_a
    ADD CONSTRAINT fk_ab FOREIGN KEY(column_a) REFERENCES tbl_b (column_b) ON UPDATE CASCADE ON DELETE CASCADE

    If I leave out the part starting with "ON UPDATE ..." the statement is being executed.

    My DBMS is MS ACCESS 2003

    Thanks a lot for your help!

  2. #2
    Join Date
    Oct 2005
    Posts
    2,557
    ALTER TABLE tbl_a
    ADD CONSTRAINT fk_ab FOREIGN KEY(column_a) REFERENCES tbl_b (column_b) ON DELETE CASCADE

    is proper syntax.

Posting Permissions

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