查询表table_name中col_name(字符串类型)的值是数字的记录 SELECT col_name,CAST(col_name AS UNSIGNED INTEGER) AS val FROM table_name WHERE col_name=0 OR col_name0 HAVING CHAR_LENGTH(col_name)=CHAR_LENGTH(val);
查询表table_name中col_name(字符串类型)的值是数字的记录
SELECT col_name,CAST(col_name AS UNSIGNED INTEGER) AS val
FROM table_name
WHERE col_name="0" OR col_name>0
HAVING CHAR_LENGTH(col_name)=CHAR_LENGTH(val);
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn