Just complementing Luiz Santos's answer, giving comparative examples with other DBMSs:
In SQL Server or MySQL, when you want to select a value that is not contained in a specific table (such as a variable declared in a query scope, or native function), we can simply use the command SELECT
, without specifying where to select those values:
SELECT 'EXEMPLO'
In the Oracle databases, we can not perform the above command, considering how Oracle works its SELECT
clauses, forcing us to explicitly where we are looking for this data, through clause FROM
. For the same example given above in an Oracle database, the action would be represented by the following clause:
SELECT 'EXEMPLO' FROM DUAL
In my opinion, this "imaginary " table, used for relatively simple operations (a selection), leaves the code confusing for the reads or comes from another context that applies SQL.
In this link there is a brief history of the table, told by its creator, Chuck Weiss , if you are interested, in English.