Reputation: 165
In oracle DB we can display rowid & rownum with table column, but in PostgreSQL does anything can we display along with table column?
Ex: select rowid, rownum,id_mytable from mytable;
Upvotes: 1
Views: 69
Reputation: 56
You can use the ctid
column:
SELECT ctid, *
FROM some_table
LIMIT 10;
There is window function row_number() over()
, but it doesn't return row identifier, it is only numbers of rows in query results.
Upvotes: 3