最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
mysql UNION 语法详细说明与实例教程
时间:2010-11-16 编辑:简简单单 来源:一聚教程网
mysql教程 union 语法详细说明与实例教程
本文介绍如何在mysql中使用union来组合成一个单一的结果
union语法
select field1, field2 ...union [all | distinct]select field1, field2 ...
下面看一款查询三个表普通方法
select brand from car;
select brand from computer;
select brand from clothing;
我们利用union连接起来查询
select brand from car union select brand from computer union select brand from clothing;select brand from car union all select brand from computer union allselect brand from clothing;
相关文章
- mysql的replace into实例详解 06-06
- Python 操作MySQL详解以及实例介绍 05-03
- 关于SQL Server链接MySQL的几个实例 09-08
- python callproc调用 Mysql 储存过程教程实例 08-22
- MySQL视图(View)学习教程及实例 11-14
- Python操作Mysql实例代码教程 12-16