"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/docs/where.rst" (6 May 2012, 1389 Bytes) of package /linux/misc/old/drizzle-7.1.36-stable.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

WHERE

The WHERE clause is used to extract only those records that fulfill a specified criterion.

Simple SQL WHERE Syntax:

SELECT column_name(s)
FROM table_name
WHERE column_name operator value

Simple WHERE Clause Example

The "Persons" table:

Id LastName FirstName Address City
1 Larson Sue 3 Cherry Chicago
2 Roberts Teri 21 Brown Chicago
3 Peterson Kari 30 Mell Reno

If you want to select only the persons living in the city "Chicago" from the table above, use the following SELECT statement:

SELECT * FROM Persons
WHERE City='Chicago'

The result-set will look like this:

Id LastName FirstName Address City
1 | Lar son | Sue

|3 Ch

erry | Chi cago
2 | Rob erts | Ter i |21 B rown | Chi cago