How to compare two rows in same table

  • Actually i was able to compare two rows in same table after inner joining them from multiple tables

    But was only able to compare one field

    As you can see in the image

     

    where cur.product_id=100

    but i also want to check

     cur.product_id=200 ,

    but when i include

    where cur.product id=100 and cur.product_id=200 ,

    it returns empty table , how can i fix it.

     

    The image is attached below

    • This topic was modified 4 years, 7 months ago by  ranadas.
    Attachments:
    You must be logged in to view attached files.
  • Actually, you need to specify OR in your where clause instead of AND.

    A product id cannot be both 100 and 200, it is one or the other.

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

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