What are Pseudocolumns ~ OracleSource

Monday, July 14, 2008

What are Pseudocolumns

A pseudocolumn is 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.

Examples:
CURRVAL, USER, NEXTVAL, ROWNUM, ROWID,LEVEL

Currval and Nextval are used with Sequences to retreive the next sequence value and current sequence value.

The usage is as follows :
Suppose abc is the sequence name and if we want to see the Currval of the sequence then we issue the below sql statement:-

Select abc.currval From dual;

If we want to see the Next value of the sequence then we issue the command :-
Select abc.nextval From dual;

No comments: