Connecting Tech Pros Worldwide Forums | Help | Site Map

Support for ROWNUM and ROWID

Newbie
 
Join Date: May 2007
Location: Pune (India)
Posts: 10
#1: May 17 '07
hi all

Is postgreSQL supports ROWNUM and ROWID ?


-thanks-
Chitranjan Singh

Moderator
 
Join Date: Nov 2006
Location: Boston, USA
Posts: 505
#2: May 17 '07

re: Support for ROWNUM and ROWID


Postgresql does not have an equivalent of Oracle's ROWNUM.
In many cases you can achieve the same result by using LIMIT and OFFSET in your query.

Same with ROWID; it does not exist in Postgresql, but you can use CTID as a reference to a row. CTID is a system column containing the file block number and position in the block for the row.

Sometimes people use OID, but in the latest releases this system column is optional, and it is not created unless you explicitly request it in your "CREATE TABLE" statement.
dmjpro's Avatar
Lives Here
 
Join Date: Jan 2007
Location: India (West-Bengal)
Posts: 2,451
#3: Jul 3 '08

re: Support for ROWNUM and ROWID


Is CTID unique???

Debasis Jana.
Reply


Similar PostgreSQL Database bytes