SUBSTR() function is used to retrieve the portion of any column.
Example: To get first five character of Contact Number use below command:
SELECT SUBSTR(ContactNo,1,5) FROM Shopping.Customer;
+-----------------------+
| SUBSTR(ContactNo,1,5) |
+-----------------------+
| 99990 |
| 96504 |
| 11111 |
| 12345 |
+-----------------------+
4 rows in set (0.00 sec)