SUBSTRING
Cuts out part of a string: from the position you need and of the length you need.
Syntax
SUBSTRING(<text> FROM <start>)
SUBSTRING(<text> FROM <start> FOR <length>)
SUBSTRING(<text>, <start>, <length>)
Positions are counted from 1. FROM — which character to start at, FOR — how many characters to take; without FOR, everything up to the end is taken. The comma form does the same.