mysql也有dual表吗?

MySql 码拜 8年前 (2016-02-08) 2439次浏览
1.从哪个版本开始有dual表呢?
2.和oracle的dual用法上有什么区别?
3.mysql的dual一般在什么清下使用?
解决方案

20

至少5.1已经有DUAL
You are allowed to specify DUAL as a dummy table name in situations where no tables are referenced:
mysql> SELECT 1 + 1 FROM DUAL;
-> 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. MySQL does not require FROM DUAL if no tables are referenced

15

3.mysql的dual一般在什么清下使用?
DUAL is purely for the convenience of people who require that all SELECT statements should have FROM and possibly other clauses

5

与ORACLE中的没什么差别。

CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明mysql也有dual表吗?
喜欢 (0)
[1034331897@qq.com]
分享 (0)