Database Reference
In-Depth Information
The result will again be a table with all rows and all four of the columns in SKU_DATA:
Reading Specified Rows from a Single Table
Suppose we want all of the columns of the SKU_DATA table, but we want only the rows for
the Water Sports department. We can obtain that result by using the SQL WHERE clause as
follows:
/* *** SQL-Query-CH02-06 *** */
SELECT *
FROM
SKU_DATA
WHERE
Department='Water Sports';
The result of this statement will be:
In an SQL WHERE clause, if the column contains text or date data, the comparison values
must be enclosed in single quotation marks ( '{text or date data}' ). If the column contains numeric
data, however, the comparison values need not be in quotes. Thus, to find all of the SKU rows with
a value greater than 200,000, we would use the SQL statement (note that no comma is included in
the numeric value code):
/* *** SQL-Query-CH02-07 *** */
SELECT *
FROM
SKU_DATA
WHERE
SKU > 200000;
The result is:
 
 
Search WWH ::




Custom Search