SQL - Functions Flashcards
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.