~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to docs/functions.rst

new function and clause files, some placeholders for right now

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
SQL Functions
2
2
=============
3
3
 
4
 
Several SQL functions are built into Drizzle--functions perform calculations on data. They can be divided into two general types: Aggregate and Scalar.
5
 
 
6
 
**SQL Aggregate Functions**
7
 
 
8
 
*SQL aggregate functions are calculated from values in a column, and return a single value.*
9
 
 
10
 
General syntax for aggregate functions is: ::
11
 
 
12
 
        SELECT "function type" ("column_name")
13
 
        FROM "table_name"
14
 
 
15
 
Click on the following aggregate functions to learn more:
16
 
 
17
 
    * AVG() - Returns the average value
18
 
    * COUNT() - Returns the number of rows
19
 
    * FIRST() - Returns the first value
20
 
    * LAST() - Returns the last value
21
 
    * MAX() - Returns the largest value
22
 
    * MIN() - Returns the smallest value
23
 
    * SUM() - Returns the sum
24
 
 
25
 
**SQL Scalar functions**
26
 
 
27
 
*SQL scalar functions are based on the input value, and return a single value.*
28
 
 
29
 
General syntax for scalar functions is: ::
30
 
 
31
 
        SELECT "function type" ("column_name")
32
 
        FROM "table_name"
33
 
 
34
 
Click on the following scalar functions to learn more:
35
 
 
36
 
    * UCASE() - Converts a field to upper case
37
 
    * LCASE() - Converts a field to lower case
38
 
    * MID() - Extract characters from a text field
39
 
    * LEN() - Returns the length of a text field
40
 
    * ROUND() - Rounds a numeric field to the number of decimals specified
41
 
    * NOW() - Returns the current system date and time
42
 
    * FORMAT() - Formats how a field is to be displayed
43
 
 
44
 
 
 
4
Several SQL functions are built into Drizzle--functions perform calculations on data. They can be divided into two general types: 
 
5
   
 
6
.. toctree::
 
7
   :maxdepth: 2
 
8
 
 
9
   aggregatefunctions
 
10
   scalarfunctions
 
 
b'\\ No newline at end of file'