MySQL, SQL Server, PostgreSQL, SQLite support using the percent sign as the modulus:
WHERE column % 2 = 1
For Oracle, you have to use the MOD function:
WHERE MOD(column, 2) = 1
At least some versions of SQL (Oracle, Informix, DB2, ISO Standard) support:
WHERE MOD(value, 2) = 1
MySQL supports '%' as the modulus operator:
WHERE value % 2 = 1
Note: Disregard this answer, as I must have misunderstood the question.
select *
from Table
where len(ColName) mod 2 = 1
The exact syntax depends on what flavor of SQL you're using.
select * from table where value % 2 = 1
works fine in mysql.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With