Oracle, DB2, SQLite: use SUBSTR(expr, start, length). SQLite has no
built-in SUBSTRING function (only substr); Oracle/DB2 use SUBSTR
as their canonical name (both also happen to accept the same argument
order as the standard SUBSTRING(expr, start, length) form).
MSSQL: SUBSTRING(expr, start, length), but MSSQL requires the length
argument. When length is omitted, LEN(expr) is used as a safe upper
bound so the result runs to the end of the string.
Extract a substring.
SUBSTR(expr, start, length). SQLite has no built-inSUBSTRINGfunction (onlysubstr); Oracle/DB2 useSUBSTRas their canonical name (both also happen to accept the same argument order as the standardSUBSTRING(expr, start, length)form).SUBSTRING(expr, start, length), but MSSQL requires the length argument. Whenlengthis omitted,LEN(expr)is used as a safe upper bound so the result runs to the end of the string.SUBSTRING(expr, start, length)comma-argument form, length optional.