delete with inner join

  • I tried to delete rows from a table with inner join with another table based on keys. But I am unable to do that. Here what am I trying to achieve:

    Delete table A

    INNER JOIN table B

    ON tableA.column1 = tableB.column1

    tableA.column2 = tableB.column2

    tableA.column3 = tableB.column3

    tableA.column4 = tableB.column4

    tableA.column5 = tableB.column5

    Can any one give me some idea about how could I achieve this ?

    Any kind of help will be appreciated.

    Thanks

  • Sabina Yasmin (5/23/2008)


    I tried to delete rows from a table with inner join with another table based on keys. But I am unable to do that. Here what am I trying to achieve:

    Delete table A

    INNER JOIN table B

    ON tableA.column1 = tableB.column1

    tableA.column2 = tableB.column2

    tableA.column3 = tableB.column3

    tableA.column4 = tableB.column4

    tableA.column5 = tableB.column5

    Can any one give me some idea about how could I achieve this ?

    Any kind of help will be appreciated.

    Thanks

    You're close:

    Delete tableA

    FROM tableA

    INNER JOIN tableB

    ON tableA.column1 = tableB.column1

    tableA.column2 = tableB.column2

    tableA.column3 = tableB.column3

    tableA.column4 = tableB.column4

    tableA.column5 = tableB.column5

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Thanks, it's working fine

Viewing 3 posts - 1 through 2 (of 2 total)

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