Every table in an Oracle database has a pseudocolumn named ROWID.
red hat certified specialist in linux performance tuning malaysia
A pseudocolumn behaves like a table column, but is not actually stored in the table. You can select from pseudocolumns, but you cannot insert, update, or delete their values. A pseudocolumn is also similar to a SQL function without arguments. Functions without arguments typically return the same value for every row in the result set, whereas pseudocolumns typically return a different value for each row.
Values of the ROWID pseudocolumn are strings representing the address of each row. These strings have the data type ROWID. This pseudocolumn is not evident when listing the structure of a table by executing SELECT or DESCRIBE, nor does the pseudocolumn consume space. However, the rowid of each row can be retrieved with a SQL query using the reserved word ROWID as a column name.
red hat certification malaysia
The following example queries the ROWID pseudocolumn to show the rowid of the row in the employees table for employee 100:
CopySQL> SELECT ROWID FROM employees WHERE employee_id = 100;
ROWID
------------------
AAAPecAAFAAAABSAAA
See also
- “Rowid Format”
- Oracle Database Development Guide to learn how to identify rows by address
- Oracle Database SQL Language Reference to learn about rowid types
Leave a Reply