~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/where.rst

  • Committer: Andrew Hutchings
  • Date: 2011-02-15 22:03:42 UTC
  • mto: (2172.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 2173.
  • Revision ID: andrew@linuxjedi.co.uk-20110215220342-k4tveraug3bpy2v5
Make fixes to temporal docs
Make a few minor docs cleanups/fixes
Start using syntax-highlighting code blocks

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
The WHERE clause is used to extract only those records that fulfill a specified criterion.
5
5
 
6
 
Simple SQL WHERE Syntax ::
 
6
Simple SQL WHERE Syntax:
 
7
 
 
8
.. code-block:: mysql
7
9
 
8
10
        SELECT column_name(s)
9
11
        FROM table_name
23
25
| 3       | Peterson   | Kari     |30 Mell   | Reno   |
24
26
+---------+------------+----------+----------+--------+
25
27
 
26
 
If you want to select only the persons living in the city "Chicago" from the table above, use the following SELECT statement: ::
 
28
If you want to select only the persons living in the city "Chicago" from the table above, use the following SELECT statement:
 
29
 
 
30
.. code-block:: mysql
27
31
 
28
32
        SELECT * FROM Persons
29
33
        WHERE City='Chicago'
32
36
 
33
37
+---------+------------+----------+----------+--------+
34
38
| Id      |LastName    |FirstName |Address   |City    |
35
 
+---------+------------+----------+----------+--------+
 
39
+=========+============+==========+==========+========+
36
40
|1        | Larson     | Sue      |3 Cherry  | Chicago|
37
41
+---------+------------+----------+----------+--------+
38
42
|2        | Roberts    | Teri     |21 Brown  | Chicago|