Pseudo columns
A pseudo column is an item of data which does not belong in any particular table but which can be treated as if it did. Any SELECT list of columns can include these pseudo columns. SYSDATE current date and time ROWNUM sequence number assigned to retrieved rows ROWID unique identifier for a row UID number associated with a user USER userid of current user
The DUAL table
ORACLE provides a "dummy" table called DUAL containing one column and one row. It is useful for selecting miscellaneous information from ORACLE.
Some uses for DUAL
- Display today's date
SELECT SYSDATE FROM dual;
- Display the value of 356 divided by 17, to three decimal places
SELECT ROUND(356 / 17, 3) FROM dual;
- Display the current user name
SELECT USER FROM dual;