Assuming 5 unique rows match the SELECT criteria of a ROW_NUMBER sub-select:
SELECT * FROM
SELECT ROW_NUMBER() OVER() AS row_num, inner.* FROM
) AS inner
) AS outer;
The expected output is 5 rows. In the attached example I get 10, every row duplicated once.
OS is Ubuntu 11.04
JDK is Oracle jdk1.6.0_31
Log in to post a comment.