General discussion

  • Creator
    Topic
  • #2259056

    Delete + Sql server

    Locked

    by preethiraajesh ·

    Hello,

    Three tables are there A, B, C. In table A the primary key id ‘AId’ which is forigen key in the other two tables.
    I want that if I delete 1 row from table A the corresponding rows from tables B & C should be automatically deleted.
    Got it or not?

    If anybody has answer then please do help

    Thanks

All Comments

  • Author
    Replies
    • #3282525

      Look up cascading deletes

      by tony hopkinson ·

      In reply to Delete + Sql server

      SQL server 2000, onwards definiteley has it. You define them when you set up the foriegn key.

Viewing 0 reply threads