~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/count.rst

remoing backticks

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
The SQL COUNT function returns the number of rows in a table satisfying the criteria specified in the WHERE clause. If we want to count how many orders has made a customer with CustomerName of Smith, we will use the following SQL COUNT expression: ::
23
23
 
24
24
        SELECT COUNT * FROM Nodes
25
 
        WHERE UserName = 'Smith'
 
25
        WHERE UserName = "Smith";
26
26
 
27
27
In the above statement, the COUNT keyword returns the number 3, because the user Smith has 3 total nodes.
28
28
 
29
29
If you don’t specify a WHERE clause when using the COUNT keyword, your statement will simply return the total number of rows in the table, which would be 6 in this example: ::
30
30
 
31
 
        SELECT COUNT * FROM Nodes
 
31
        SELECT COUNT * FROM Nodes;