Friday, August 28, 2015

SQL -- conditional selections

In the last example the condition was first should equal 'Eric'. Besides equal here are other conditional clauses used in SQL:



= Equal
> Greater than
< Less than
>= Greater than or equal
<= Less than or equal
<> Not equal to
LIKE pattern matching operator, use "%" as character wild card

Here is an example:



select first,
       last,
       city
  from empinfo
where city <>
  'Payson';



No comments:

Post a Comment