Trim the spaces and then the zeroes:
TRIM(LEADING '0' FROM TRIM(account_ref))
When you try to trim the zeroes first, any values that have spaces at the beginning and then zeroes will only be trimmed off of spaces.
As for your question about precedence it is indicated by the nested parentheses.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.