I have a column that contains numbers and other string values (like \"?\", \"???\", etc.)
Is it possible to add an \"is number\" condition to the where clause in SQL
As SQLite and MySQL follow the same syntax and loose datatypes.
The query below is also possible
SELECT
, (
LENGTH(CAST( AS UNSIGNED))
)
=
CASE WHEN CAST( AS UNSIGNED) = 0
THEN CAST( AS UNSIGNED)
ELSE (LENGTH()
) END AS is_int;
Note the is BNF you would have the replace those values.
This answer is based on mine other answer
Running SQLite demo