Mssql or condition

0 Comment

How to use mssql server OR condtion in where i will show you all types using or condition..

please follow this example.

  1. select * from table where columname = ‘abc’ or columname1 = 1.
  2. select * form table where (columname1 = ‘abc’ or columname2=’abc2′) or (columname3=’abc3′ or columname4=’abc4′)

The 2nd example showing that one condtion is (columname1 = ‘abc’ or columname2=’abc2′)  if its true or if not true then it will be use 2nd condtion column3 and 4.


Please do comments if you have any question. share with your friends.

Tags: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *