what is dual table in sql

what is dual table in sql

1 year ago 33
Nature

The DUAL table is a special one-row, one-column table present by default in Oracle and other database installations. It is useful for computing a constant expression with the SELECT statement, as it has only one row, and the constant is returned only once. The owner of DUAL is SYS, and it is in the schema of the user SYS but is accessible by the name DUAL to all users. The table has a single VARCHAR2(1) column called DUMMY that has a value of X. MySQL allows DUAL to be specified as a table in queries that do not need data from any tables, and it is suitable for use in selecting a result function such as SYSDATE() or USER(), although it is not essential. In SQL Server, DUAL table does not exist, but you could create one.

Read Entire Article