Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2007
    Posts
    64

    Thumbs down Unanswered: MySQL JOIN Syntax

    Is it possible to have TWO ON conditions in a single JOIN Syntax
    Ex:
    SELECT *
    FROM purchase LEFT JOIN machinedetails ON machinedetails.purchaseid = 3
    ON purchase.purchaseid = machinedetails.purchaseid

  2. #2
    Join Date
    Dec 2007
    Posts
    253
    No, but you CAN use logical operators:
    Code:
    FROM purchase LEFT JOIN machinedetails ON machinedetails.purchaseid = 3
    AND purchase.purchaseid = machinedetails.purchaseid

Posting Permissions

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