Friday, September 11, 2009

ODD AND EVEN NUMBER

SELECT *
FROM stempgen
WHERE (ROWID, 1) IN (SELECT ROWID, MOD (ROWNUM, 2)
FROM stempgen)

SELECT *
FROM stempgen
WHERE (ROWID, 0) IN (SELECT ROWID, MOD (ROWNUM, 2)
FROM stempgen)

select mod(rownum,2) from stempgen

No comments: