DUAL

Stai visualizzando una vecchia versione di questo article. Visualizza la versione più recente.

Spiegazione

E' possibile specificare DUAL come tabella fittizia, nelle situazioni in cui nessuna tabella è coinvola:

MariaDB [(none)]> SELECT 1 + 1 FROM DUAL;
+-------+
| 1 + 1 |
+-------+
|     2 |
+-------+

DUAL is purely for the convenience of people who require that all SELECT statements should have FROM and possibly other clauses. MySQL may ignore the clauses. MariaDB does not require FROM DUAL if no tables are referenced.

Commenti

Sto caricando i commenti......
Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.