Use of %vid for row selection - syntax?
Customer is experimenting with %vid variable for selecting row numbering for sql queries. Basically he's trying to implement paging functionality.
He is confused that select %vid from (select ...)
returns dummy number whilst select *,%vid from (select...)
returns correct data.
I believe, according to the documentation...
The phrase “SELECT * ...” does not include %vid; it must be selected explicitly: “SELECT *, %vid ...”. Also, while this feature is very convenient, especially for porting Oracle queries (this maps easily to Oracle ROWNUM), performance of queries may change as compared to TOP.
... that the syntax select *,%vid...
is mandatory, but want to double check. Can anyone confirm, please?
Thank you!