What is a DUAL table in SQL?

6 viewed last edited 5 years ago

I understand its a 1x1 table but i don't see where it is used and what it stands for. Could you please explain it?

Vivekanand Vellanki

Take a look at https://en.wikipedia.org/wiki/DUAL_table.

Looks like it is not required - in fact, Teradata does not use it.

This seems to have been introduced as a convenience since SQL queries need to specify a table. Having a dummy table helps run queries like:

select 1+1 from dual;

The link has a more detailed explanation for why Oracle introduced the DUAL table