0
votes

Is there a way to query the OIDs in MonetDB using SQL? That is, I'd like to do something along the lines of

SELECT <oid>, <column 1>, ..., <column N> FROM <table>

and

SELECT * FROM <table> WHERE <oid> IN (...)

I looked through the documentation and source examples, but found no mention to querying OIDs or even if the OIDs are accessible in MonetDB/SQL.

1

1 Answers

-1
votes

I don't think you can access the OID's directly through the SQL interface, since they are for internal use only. However, you can get row identifiers, which might do what you are looking for. See Window functions for more information.

So you would get something like

SELECT ROW_NUMBER over () AS row, , ..., FROM

What do you need it for?