In DB2:
SELECT RRN(t),
______t.*
___FROM myTable t
or for more complicated queries:
WITH myView AS(
___complicated stuff goes here)
SELECT RRN(v),
______v.*
___FROM myView v
For Oracle:
SELECT ROWNUM,
______*
___FROM myTable
For more complicated queries in Oracle, nothing to worry about. RRN counts rows in the input table, but ROWNUM counts rows in the output result set.
—
Sheldon Linker (sol@linker.com)
Linker Systems, Inc. (www.linkersystems.com)
+1-949-552-1904
Discuss This Question: 3  Replies