我有一列包含数字和其他字符串值(如“?”、“???”等)
是否可以在 SQLite 的 where 子句中添加一个“is number”条件?像这样的东西:
select * from mytable where isnumber(mycolumn)
最佳答案
来自documentation ,
The typeof(X) function returns a string that indicates the datatype of the expression X: "null", "integer", "real", "text", or "blob".
您可以使用 where typeof(mycolumn) = "integer"
关于sql - SQLite中如何检查一个值是否为数字,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32528759/