Check if a string contains numbers

倖福魔咒の 提交于 2019-11-29 02:59:50

Check out the MySQL Regex methods. Something like the following should work.

SELECT * FROM table WHERE tag REGEXP '[0-9]'
user3200518
SELECT * 
FROM clients
WHERE name REGEXP '^[[:digit:]]+$'
ORDER BY `clients`.`country_id` DESC 
LIMIT 0 , 30

this is the answer if you're looking for strings with only digits

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!