SQL Server supports a modulo operator ( % ), not sure about other DBMSs.

You could get all even numbers like this:

SELECT *
FROM tblValues
WHERE aValue % 2 = 0

To get the odd ones, just replace the equal sign with <>.


----- Original Message -----
From: <[EMAIL PROTECTED]>


Can anyone give me a sql statement that tells me if a value is odd or even?

select * from table where ?????
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to