how to trim leading zeros from alphanumeric text in mysql function

You are looking for the trim() function.

Alright, here is your example

SELECT TRIM(LEADING '0' FROM myfield) FROM table

Leave a Comment