Home  >  Article  >  Database  >  How to get self-calculation output from MySQL without a virtual table named Dual?

How to get self-calculation output from MySQL without a virtual table named Dual?

WBOY
WBOYforward
2023-09-06 19:25:02857browse

在没有名为 Dual 的虚拟表的情况下,如何从 MySQL 获取自计算输出?

In MySQL, we can simply specify the SELECT condition separately to get self-calculated output. The 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)

The above is the detailed content of How to get self-calculation output from MySQL without a virtual table named Dual?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:tutorialspoint.com. If there is any infringement, please contact admin@php.cn delete