What is the way to get self-computed output from MySQL without a dummy table named dual?

MySQLMySQLi Database

In MySQL, we can simply specify the SELECT conditions all alone to get the self-computed output. Following example will demonstrate it −

mysql> Select 1+1;

+-----+
| 1+1 |
+-----+
| 2   |
+-----+
   
1 row in set (0.02 sec)

mysql> Select 1;

+---+
| 1 |
+---+
| 1 |
+---+

1 row in set (0.00 sec)
raja
Published on 19-Feb-2018 14:48:30
Advertisements