Computer >> Computer tutorials >  >> Programming >> MySQL

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


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)