Select Statement Notes
Select Statement Notes
SQL Server UPPER() Function
The UPPER() function converts a string to upper-case.
SQL Server SUBSTRING() Function
The SUBSTRING() function extracts a substring from a string (starting at any
position).
Parameter Description
start Required. The start position. Can be both a positive or negative number. If it is a positive number,
this function extracts from the beginning of the string. If it is a negative number, this function
extracts from the end of the string
length Optional. The number of characters to extract. If omitted, the whole string will be returned (from
the start position)
Mysql CONCAT() Function
The CONCAT() function adds two or more expressions together.
Parameter Description
WHERE CustomerName LIKE 'a%' Finds any values that start with "a"
WHERE CustomerName LIKE '%a' Finds any values that end with "a"
WHERE CustomerName LIKE '%or%' Finds any values that have "or" in any position
WHERE CustomerName LIKE '_r%' Finds any values that have "r" in the second position
WHERE CustomerName LIKE 'a_%' Finds any values that start with "a" and are at least 2 characters
in length
WHERE CustomerName LIKE 'a__%' Finds any values that start with "a" and are at least 3 characters
in length
WHERE ContactName LIKE 'a%o' Finds any values that start with "a" and ends with "o"
MySQL CHAR_LENGTH() Function
The CHAR_LENGTH() function return the length of a string (in characters).
Parameter Description
SQL Server ROUND() Function
The ROUND() function rounds a number to a specified number of decimal
places.
Parameter Description