Oracle DUAL Table

The Oracle DUAL table is a table created by Oracle and is used for selects statements that do not have a table name to go along with them.

For example, the DUAL table can be used to select pseudo columns, such as getting the currval or nextval from an Oracle sequence.

SELECT myseq.nextval FROM DUAL;

The DUAL table has one column, named “DUMMY,” which is a VARCHAR2 datatype of length 1. The value of the record is “X.”

All Oracle users have access to the DUAL table, although it is owned by “SYS.”

The DUAL table should not be updated, altered, or deleted.

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.