SQL syntax

  • How should I do it better, it is not working in where for 2 fields

    DELETE FROM table1

    WHERE (ID,ui) IN

    (SELECT CONCAT(V.ID, V.ui)

    FROM table2 V

    )

    Thank you

  • Use EXISTS.

    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
  • Sorry where?

  • Use EXISTS instead of IN.

    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

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

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