SQL VALUE FUNCTIONS

These SQL value functions perform operations on data. There are all kinds of operations that could conceivably be performed on data items, but these are some that are needed most often.
String Value Functions
FunctionEffect
SUBSTRINGExtracts a substring from a source string
SUBSTRING SIMILARExtracts a substring from a source string, using POSIX-based
regular expressions
SUBSTRING_REGEXExtracts from a string the first occurrence of an XQuery
regular expression pattern and returns one occurrence of the
matching substring
TRANSLATE_REGEXExtracts from a string the first or every occurrence of an
XQuery regular expression pattern and replaces it or them with an XQuery replacement string
UPPERConverts a character string to all uppercase
LOWERConverts a character string to all lowercase
TRIMTrims off leading or trailing blanks
TRANSLATETransforms a source string from one character set to
another
CONVERTTransforms a source string from one character set to
another
Numeric Value Functions
FunctionEffect
POSITIONReturns the starting position of a target string within a
source string
CHARACTER_LENGTHReturns the number of characters in a string
OCTET_LENGTHReturns the number of octets (bytes) in a character string
EXTRACTExtracts a single field from a datetime or interval
Datetime Value Functions
FunctionEffect
CURRENT_DATEReturns the current date
CURRENT_TIME(p)Returns the current time; (p) is precision of seconds
CURRENT_TIMESTAMP(p)Returns the current date and the current time; (p) is precision of seconds