how to select the first word from database?
for example,
table a
1 | 1A 2 | 2A 3 | 1B 4 | 3A
how to use the 'select' statement to show first word in field name in table a
the result will show 1, 2, and 3.
Please Help me
SELECT DISTINCT SUBSTR(`name`,1,1) AS first_char FROM table_name ORDER BY first_char;