Switch to full style
Include SQL commands
Post a reply

SQL AND OR in WHERE query Commands

Tue Jul 17, 2012 5:23 pm

You can add OR AND to set combinations and more than one condition in the WHERE clause statement

For AND :
This query will display records with number of students larger than 100 and type is equal Major.
Code:

SELECT 
FROM Department WHERE DeptType='Major' AND numOfStudents >100 


For OR:
This query will display records with number of students larger than 100 or type is equal Major.
Code:

SELECT 
FROM Department WHERE DeptType='Major' OR numOfStudents >100 




Post a reply
  Related Posts  to : SQL AND OR in WHERE query Commands
 FTP commands     -  
 DELETE Commands     -  
 jar files commands     -  
 Graphics commands list in C++     -  
 Execute System Commands     -  
 EJB-QL IN where query     -  
 more than one parameter with name query     -  
 query about execution     -  
 select query example in php     -  
 SQL LIKE query Command     -