The syntax for built-in SQL functions is |
|
Function | Description |
---|---|
AVG(column) | Returns the average value of a column. |
COUNT(column) | Returns the number of rows (without a NULL value) of a column. |
COUNT(*) | Returns the number of selected rows. |
COUNT(DISTINCT column) | Returns the number of distinct results. |
FIRST(column) | Returns the value of the first record in the specified field. |
LAST(column) | Returns the value of the last record in the specified field. |
MAX(column) | Returns the highest value of a column. |
MIN(column) | Returns the lowest value of a column. |
SUM(column) | Returns the total sum of a column. |
Function | Description |
---|---|
UCASE(c) | Converts a field to upper case. |
LCASE(c) | Converts a field to lower case. |
LEN(c) | Returns the length of a text field. |
Customers
table may be created by the following command:
SQL> create table Customers ( 2 CustomerID varchar(16), 3 CompanyName varchar(32), 4 ContactName varchar(32), 5 Address varchar(64), 6 City varchar(32), 7 PostalCode varchar(16), 8 Country varchar(32) );Note that the
Customers
table is for read only.