SQL AND & OR Operators AND OR Example

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Example

Have a table

NameAgeCity
Bob10Paris
Mat20Berlin
Mary24Prague
select Name from table where Age>10 AND City='Prague'

Gives

Name
Mary

select Name from table where Age=10 OR City='Prague'

Gives

Name
Bob
Mary


Got any SQL Question?