There are dual virtual tables similar to those in Oracle in mysql: the official statement is purely to satisfy select... from... mysql ignores the reference to this table.
You can pay attention to the following:
Select * from dual; mysql will encounter an error -- 1096: The table is not used; and oracle will return the column "du ", its value is "X"-the behavior is the same as that of a normal table with only one record!
Select express [from dual]; mysql is always executed as a normal select statement that returns the value of this expression, and returns the result set of a row of records. from dual is simply a decoration for mysql! In oracle, this sentence must contain from dual; otherwise, an error is returned!
Select express from dual where 0 = 2; the behavior of mysq is the same as that of oracle: This statement is just like the normal table you think -- The where condition is calculated first before the computation of express; the where condition determines whether expres returns!
To sum up:
Oracle's dual features code aesthetics, unified style, and conventions!
In SQL Server, select has the characteristics of combining mysql with oracle:
Select * sqlserver reports an error similar to mysql -- you must specify a table. This is completely a sentence, and no one will recognize it!
Select express sqlserver is similar to mysql. A valid statement returns the result set of a row of records.
Select express where 0 = 2 sqlserver features: The from clause is not required. Consider the where clause to determine whether to return the result set.