Showing posts with label OR. Show all posts
Showing posts with label OR. Show all posts

Thursday, 7 February 2013

SQL: AND vs OR (operators)

   


In SQL Server we can use different operators in our queries: AND, OR, LIKE, BETWEEN and so on. In this short post we are going to see AND and OR because I've noticed that some could get confused by the results obtained when using them.

So, let's clear the situation a bit, because we really need to know what we are doing!

Friday, 20 January 2012

SQL: the IN operator

   


The IN operator can be very useful when we need to perform SQL queries where we need to filter the results with more than one possible value.
Just to understand the power of the IN operator,  we need to go back a few steps and see how we usually filter data from a table with the OR operator.