Delete Statement in SQl 2000

  •  

     In SQl, is there any other way of deleting records from two tables at a time in a single query?

    ManoKarnan

  • Do u have any link between the two tables..

  • why do you want to do this ?

  •  

    I have a proper link between two tables. I want to delete a common record in both tables in a single delete statement.

  • If the foreign key between the tables is set to cascade delete them you can delete from the parent and SQL will cascade the deletes down to the child table. Otherwise you'll have to do the deletes from each table individually.

    Why the need to do in one statement?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  •  

     Thanks for your replies.

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply