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)

Updated on: 29-Jan-2020

90 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements