20.07.2013 Views

Beginning SQL

Beginning SQL

Beginning SQL

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The WHERE Clause<br />

So far you’ve seen only a situation in which the database system performs an update if a column is equal<br />

to a certain value, but you can use other comparisons as well. The following table details a few of the<br />

fundamental comparison operators.<br />

Comparison Example Matches All Records in<br />

Operator Name Example Film Table Where Rating Is...<br />

= Equals WHERE Rating = 5 5<br />

Not equal to WHERE Rating 1 2, 3, 4, or 5<br />

> Greater than WHERE Rating > 2 3, 4, or 5<br />

< Less than WHERE Rating < 4 1, 2, or 3<br />

>= Greater than WHERE Rating >= 3 3, 4, or 5<br />

or equal to<br />

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!