Friday, June 1, 2012

SQL AND & OR Operator

AND - This Operator displays a record if both the first condition and the second condition is true.


OR - This Operator displays a record if either the first condition or the second condition is true


AND Operator Syntax
SELECT * FROM table_name
WHERE column_name operator value
AND column_name(2) operator value


AND Operator Example
SELECT * FROM Employee
WHERE FirstName = 'John'
AND LastName = 'David'

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.