Changes

Jump to: navigation, search

Using WHERE to Filter MySQL Data

478 bytes added, 16:23, 12 October 2007
Comparison Operators
SELECT * from products WHERE prod_price != 49;
</pre>
 
=== Checking for NULL Values ===
 
In addition to being able to check for the value of a column, it isw also possible to check for columns that contain no value. Columns that have no value are said to contain NULL values. Not surprisingly, therefore, we can check for an empty column by looking for equality with NULL:
 
<pre>
SELECT * FROM products WHERE prod_name = NULL
</pre>
 
Any rows which do not contain a product name will be retrieved by the above ''SELECT'' statement.
== Searching within Range Values ==

Navigation menu