SQL - Functions
Terms
undefined, object
copy deck
- Aggregate functions: What does AVG(column_name) do?
- Returns the average value of a column.
- Aggregate functions: What does COUNT(column_name) do?
- Returns the number of rows (without a NULL value) of a column.
- Aggregate functions: What does COUNT(*) do?
- Returns the number of selected rows.
- Aggregate functions: What does FIRST(column_name) do?
- Returns the value of the first record in a specified field.
- Aggregate functions: What does LAST(column_name) do?
- Returns the value of the last record in a specified field.
- Aggregate functions: What does MAX(column_name) do?
- Returns the highest value of a column.
- Aggregate functions: What does MIN(column_name) do?
- Returns the lowest value of a column.
- Aggregate functions: What does SUM(column_name) do?
- Returns the total sum of a column.
-
Aggregate functions: What does FIRST(column_name) do?
(not supported in SQLServer2K) - Returns the value of the first record in a specified field.
-
Aggregate functions: What does LAST(column_name) do?
(not supported in SQLServer2K) - Returns the value of the last record in a specified field.
- Scalar functions: What does UCASE(c) do?
- Converts a field to upper case.
- Scalar functions: What does LCASE(c) do?
- Converts a field to lower case.
- Scalar functions: What does MID(c,start[,end]) do?
- Extract characters from a text field.
- Scalar functions: What does LEN(c) do?
- Returns the length of a text field.
- Scalar functions: What does INSTR(c,char) do?
- Returns the numeric position of a named character within a text field.
- Scalar functions: What does LEFT(c,number_of_char) do?
- Return the left part of a text field requested.
- Scalar functions: What does RIGHT(c,number_of_char) do?
- Return the right part of a text field requested.
- Scalar functions: What does ROUND(c,decimals) do?
- Rounds a numeric field to the number of decimals specified.
- Scalar functions: What does MOD(x,y) do?
- Returns the remainder of a division operation.
- Scalar functions: What does NOW() do?
- Returns the current system date.
- Scalar functions: What does FORMAT(c,format) do?
- Changes the way a field is displayed.
- Scalar functions: What does DATEDIFF(d,date1,date2) do?
- Used to perform date calculations.