SQL OR

SQL OR clause is used to select data when any of the two conditions are met.

The syntax of SQL OR clause is

SELECT columns
FROM table
WHERE condition1 OR condition2;

 

SQL OR is executed when any of the both conditions are met.

Example:

Let us take a Student Table.

StudentIDStudent_NameAddressCity
1NithinBank StreetHyderabad
2BharathWhite FieldBangalore
3GouthamAvenue colonyChennai
4BhargavJames streetChennai
5VarunPark AvenueChennai


Now we select the data where the Student City is Hyderabad or Addre