Results 1 to 2 of 2
  1. #1
    Join Date
    Mar 2004
    Posts
    205

    Unanswered: on delete cascade syntax ?

    hi,

    I tried the below in Sybase ASE 12.5 :

    CREATE TABLE test
    (
    col1 numeric (20, 0),
    CONSTRAINT CONS FOREIGN KEY(col1)
    REFERENCES config(sno) ON DELETE CASCADE ON UPDATE NO ACTION
    )

    It says, syntax near keyword 'ON'.

    Please explain, how to use 'on delete cascade' and 'on update' in CREATE table statements as in SQL Server.

    Thanks,
    Sam

  2. #2
    Join Date
    Jun 2002
    Location
    Argentina
    Posts
    78

    Unhappy

    I'm sorry, the ASE manual say:

    ...
    "The create table referential integrity constraints offer a simple way to
    enforce data integrity. Unlike triggers, they cannot:

    - Cascade changes through related tables in the database"
    ...

    So, you must write a trigger to create a cascade delete.

    Bye

    Sebastian

Posting Permissions

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