Chinaunix首页 | 论坛 | 博客
  • 博客访问: 8524
  • 博文数量: 9
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -10
  • 用 户 组: 普通用户
  • 注册时间: 2014-08-14 14:02
文章分类
文章存档

2015年(7)

2014年(2)

我的朋友
最近访客

分类: Mysql/postgreSQL

2015-05-17 22:32:26

原文地址:mysql中的dual表 作者:cenalulu

Table - `dual`:a dummy table in mysql


mysql文档中对于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.


阅读(1084) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~