How can I find strings in a table where the first character is a number?
I’m using MySQL LIKE as follows
SELECT DISTINCT label_no_country
FROM releases
WHERE label_no_country LIKE '$letter%'
ORDER BY label_no_country
where $letter is a letter between A-Z (depending on the input)
So if $letter == 'A' then it will show all entries where the first letter is A.
How can I run this query so that it will show records that start with numbers?
e.g.
1st record
cheers!
You might want to use Regular Expressions:
See MySQL docs for details.