- 浏览: 443919 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
zhengch00:
这个文档不是你自己写的吧
informatica连接ftp -
ctcwri:
于我心有慽慽焉,java的web就像陷入了泥坑。
Java 的纯真年代已经离我们越来越远了 -
bestxiaok:
Glorin 写道这个应该是你的安装目录tomcat文件夹下面 ...
Value must be an existing directory配置tomcat问题? -
Glorin:
这个应该是你的安装目录tomcat文件夹下面少了一个temp文 ...
Value must be an existing directory配置tomcat问题? -
bestxiaok:
sheep3600 写道bestxiaok 写道sheep36 ...
AES加密解密
大家在做SQL优化的过程中,可能都知道一个事实:某些情况下使用UNION替换OR可以提高SQL的运行效率。
您知道这个“某些情况”指的是什么么?
解释一下,“某些情况”指的是:使用的表字段要有索引。
这个实验,给大家展示一下这个结论
1.创建测试表
sec@ora10g> drop table t;
Table dropped.
sec@ora10g> create table t as select * from all_objects;
Table created.
sec@ora10g> alter table t rename column owner to x;
Table altered.
sec@ora10g> alter table t rename column object_name to y;
Table altered.
sec@ora10g> update t set x = 'secooler';
4785 rows updated.
OK,通过上面的初始化,我们得到了这个测试表T,我们关心它的第一个和第二个字段,修改名字后是x字段和y字段
x字段内容统一修改为“secooler”,以便模拟使用这个字段得到大量返回结果
y字段指定特定值后,模拟返回一条记录
2.开启autotrace,跟踪不同的SQL执行(为使执行计划稳定,请多次执行,得到稳定输出结果)
用到的测试SQL语句是以下三条
1)返回记录多的条件放在where子句的前面
select * from t where x = 'secooler' or y = 'T';
2)返回记录多的条件放在where子句的后面
select * from t where y = 'T' or x = 'secooler';
3)使用UNION改写上面的OR语句
select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
3.先看一下,在没有创建索引情况下的实验效果
sec@ora10g> set autotrace traceonly
sec@ora10g> select * from t where x = 'secooler' or y = 'T';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("X"='secooler' OR "Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where y = 'T' or x = 'secooler';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("Y"='T' OR "X"='secooler')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
2 3 4
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 2618920678
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4584 | 573K| | 168 (12)| 00:00:03 |
| 1 | SORT UNIQUE | | 4584 | 573K| 1448K| 168 (12)| 00:00:03 |
| 2 | UNION-ALL | | | | | | |
|* 3 | TABLE ACCESS FULL| T | 4583 | 572K| | 16 (0)| 00:00:01 |
|* 4 | TABLE ACCESS FULL| T | 1 | 128 | | 16 (0)| 00:00:01 |
------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter("X"='secooler')
4 - filter("Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
126 consistent gets
0 physical reads
0 redo size
253890 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
4782 rows processed
4.在没有创建索引情况下的实验结论
1)无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率是一样的。
2)没有创建索引的情况下,使用UNION改写后效率没有提高,反而下降了
5.在看一下,创建所需的索引情况后的实验效果
sec@ora10g> create index idx1_t on t(x);
Index created.
sec@ora10g> create index idx2_t on t(y);
Index created.
sec@ora10g> select * from t where x = 'secooler' or y = 'T';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("X"='secooler' OR "Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where y = 'T' or x = 'secooler';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("Y"='T' OR "X"='secooler')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
2 3 4
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 4276936497
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4584 | 573K| | 153 (3)| 00:00:02 |
| 1 | SORT UNIQUE | | 4584 | 573K| 1448K| 153 (3)| 00:00:02 |
| 2 | UNION-ALL | | | | | | |
|* 3 | TABLE ACCESS FULL | T | 4583 | 572K| | 16 (0)| 00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID| T | 1 | 128 | | 2 (0)| 00:00:01 |
|* 5 | INDEX RANGE SCAN | IDX2_T | 1 | | | 1 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter("X"='secooler')
5 - access("Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
66 consistent gets
0 physical reads
0 redo size
253890 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
4782 rows processed
6.在创建所需的索引后的实验结果
1)无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率还是一样的。
2)从“consistent gets”参数上看,使用UNION改写OR后,效率得到有效的提升。
7.小结
通过上面的实验,可以得到在CBO模式下,无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率是一样的。
另外一个重要结论就是:在考虑使用UNION改写OR的时候,一定要注意查看使用的字段是否已经创建了索引。
您知道这个“某些情况”指的是什么么?
解释一下,“某些情况”指的是:使用的表字段要有索引。
这个实验,给大家展示一下这个结论
1.创建测试表
sec@ora10g> drop table t;
Table dropped.
sec@ora10g> create table t as select * from all_objects;
Table created.
sec@ora10g> alter table t rename column owner to x;
Table altered.
sec@ora10g> alter table t rename column object_name to y;
Table altered.
sec@ora10g> update t set x = 'secooler';
4785 rows updated.
OK,通过上面的初始化,我们得到了这个测试表T,我们关心它的第一个和第二个字段,修改名字后是x字段和y字段
x字段内容统一修改为“secooler”,以便模拟使用这个字段得到大量返回结果
y字段指定特定值后,模拟返回一条记录
2.开启autotrace,跟踪不同的SQL执行(为使执行计划稳定,请多次执行,得到稳定输出结果)
用到的测试SQL语句是以下三条
1)返回记录多的条件放在where子句的前面
select * from t where x = 'secooler' or y = 'T';
2)返回记录多的条件放在where子句的后面
select * from t where y = 'T' or x = 'secooler';
3)使用UNION改写上面的OR语句
select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
3.先看一下,在没有创建索引情况下的实验效果
sec@ora10g> set autotrace traceonly
sec@ora10g> select * from t where x = 'secooler' or y = 'T';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("X"='secooler' OR "Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where y = 'T' or x = 'secooler';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("Y"='T' OR "X"='secooler')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
2 3 4
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 2618920678
------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4584 | 573K| | 168 (12)| 00:00:03 |
| 1 | SORT UNIQUE | | 4584 | 573K| 1448K| 168 (12)| 00:00:03 |
| 2 | UNION-ALL | | | | | | |
|* 3 | TABLE ACCESS FULL| T | 4583 | 572K| | 16 (0)| 00:00:01 |
|* 4 | TABLE ACCESS FULL| T | 1 | 128 | | 16 (0)| 00:00:01 |
------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter("X"='secooler')
4 - filter("Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
126 consistent gets
0 physical reads
0 redo size
253890 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
4782 rows processed
4.在没有创建索引情况下的实验结论
1)无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率是一样的。
2)没有创建索引的情况下,使用UNION改写后效率没有提高,反而下降了
5.在看一下,创建所需的索引情况后的实验效果
sec@ora10g> create index idx1_t on t(x);
Index created.
sec@ora10g> create index idx2_t on t(y);
Index created.
sec@ora10g> select * from t where x = 'secooler' or y = 'T';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("X"='secooler' OR "Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where y = 'T' or x = 'secooler';
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 1601196873
--------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
--------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4583 | 572K| 16 (0)| 00:00:01 |
|* 1 | TABLE ACCESS FULL| T | 4583 | 572K| 16 (0)| 00:00:01 |
--------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
1 - filter("Y"='T' OR "X"='secooler')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
111 consistent gets
0 physical reads
0 redo size
206142 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
4782 rows processed
sec@ora10g> select * from t where x = 'secooler'
union
select * from t where y = 'T'
/
2 3 4
4782 rows selected.
Execution Plan
----------------------------------------------------------
Plan hash value: 4276936497
------------------------------------------------------------------------------------------------
| Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
------------------------------------------------------------------------------------------------
| 0 | SELECT STATEMENT | | 4584 | 573K| | 153 (3)| 00:00:02 |
| 1 | SORT UNIQUE | | 4584 | 573K| 1448K| 153 (3)| 00:00:02 |
| 2 | UNION-ALL | | | | | | |
|* 3 | TABLE ACCESS FULL | T | 4583 | 572K| | 16 (0)| 00:00:01 |
| 4 | TABLE ACCESS BY INDEX ROWID| T | 1 | 128 | | 2 (0)| 00:00:01 |
|* 5 | INDEX RANGE SCAN | IDX2_T | 1 | | | 1 (0)| 00:00:01 |
------------------------------------------------------------------------------------------------
Predicate Information (identified by operation id):
---------------------------------------------------
3 - filter("X"='secooler')
5 - access("Y"='T')
Note
-----
- dynamic sampling used for this statement
Statistics
----------------------------------------------------------
0 recursive calls
0 db block gets
66 consistent gets
0 physical reads
0 redo size
253890 bytes sent via SQL*Net to client
1009 bytes received via SQL*Net from client
49 SQL*Net roundtrips to/from client
1 sorts (memory)
0 sorts (disk)
4782 rows processed
6.在创建所需的索引后的实验结果
1)无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率还是一样的。
2)从“consistent gets”参数上看,使用UNION改写OR后,效率得到有效的提升。
7.小结
通过上面的实验,可以得到在CBO模式下,无论是返回记录多的条件放在where子句的前面还是后面,从执行计划上看,效率是一样的。
另外一个重要结论就是:在考虑使用UNION改写OR的时候,一定要注意查看使用的字段是否已经创建了索引。
发表评论
-
JAVA 程序中使用ORACLE 绑定变量( bind variable )
2012-08-17 10:45 28491、为什么要使用绑定变量 (1)SQL语 句硬分 ... -
ArrayList的性能优化
2012-06-13 19:56 2053size、isEmpty、get、set、iterat ... -
oracle加 行锁
2012-06-13 13:19 1624加锁是为了防止一些操作而进行的,比如说共享锁,可以防止 ... -
java支持的最大内存
2012-06-13 11:14 17511、jdk各个版本在不同操作系统中支持的最大内存是不一样的,但 ... -
update多列更新
2012-04-05 16:06 1901再ETL的时候,经常会遇到列转换的问题,再对照转换中出现多列更 ... -
oracle数据库间数据快速 复制
2012-03-26 15:59 1939一种利用dblink模式: 1 Create public ... -
Java 的纯真年代已经离我们越来越远了
2012-03-07 15:05 1465[size=medium]用Java 去写跨 ... -
unable to access jarfile ***.jar
2012-02-28 10:52 2297相信有不少朋友遇到过这样的问题——如题,我今天也遇到了,后来发 ... -
Can't open a connection to site 'SYB_BACKUP' 解决办法
2012-02-08 10:56 2003把可能遇到的情况总结一下: 1、出错该错误可以先检查一下Syb ... -
AES加密解密
2012-01-06 16:48 1975由于刚才的方法不好使,算出来的东西不知道是什么进制,整迷糊了, ... -
java 加密解密 算法1
2012-01-06 15:44 1784采用对称的加密的算法 ... -
数据库知识:Oracle服务的知识详解
2012-01-06 14:40 1096Oracle数据库的操作中, ... -
update 多表更新
2011-11-09 15:35 977在开发中,数据库来回换,而有些关键性的语法又各不相同,这是一件 ... -
ora-00957:duplicate column name
2011-11-07 16:49 2357ora-00957:duplicate column name ... -
ResultSet获取行数
2011-11-06 11:21 1453网上有人说用这种方式获取: ResultSet里面有,你先把r ... -
java.lang.ArrayIndexOutOfBoundsException: 6
2011-11-06 11:11 4398java.lang.ArrayIndexOutOfBounds ... -
Oracle: ORA-01000: 超出打开游标的最大数问题
2011-11-02 09:53 1731java.sql.SQLException: ORA-0100 ... -
几种常用的数据库分页
2011-11-01 22:33 11661.oracle数据库分页 select * from (se ... -
查看当前数据库全表扫描的SQL
2011-07-22 16:07 2032在大数据操作表的时候经常会遇到查询慢的问题,有的时候的确是数据 ... -
oracle flashback闪回技术
2011-07-21 16:13 911今天在操作数据库的时候,由于登陆的时候没有认真看数据库名,导致 ...
相关推荐
主要介绍了MySQL中使用or、in与union all在查询命令下的效率对比,论证了在通常情况下union all并不一定比or及in更快,需要的朋友可以参考下
一:union all 肯定是能够命中索引的 二:简单的in能够命中索引 三:对于or,新版的MySQL能够命中索引 四、对于!=,负向查询肯定不能命中索引 五、其他方案
本文整理自:stackoverflow 翻译自Bill Karwin回答: 要么你读的那篇文章用了一个不好的例子,要么你误解了他们的...不需要改成UNION。 更棘手的情况是,OR条件涉及两个不同的列。 select username from users where c
SQL语句 UNION 和 UNION ALL 使用
我们可以经常发现在处理SQL Server的时,很多人都会有一句出结果的习惯,但值得注意的是,不恰当的合并处理语句,往往会产生负面的性能,本文针对使用UNION ALL代替IF语句的合并处理做出一个简单的事例,用来说明...
本程序中定义了一个结构体,其成员有一个union,union中又定义了一个结构体,很好的体现了使用union的方法
Informatica Union Transformation组件 详解
struct和union struct和union
oracle集合union、union all、intersect、minus
union all与order by用法,并详细举例,oracle pl/sql
MySQL中union和order by是可以一起使用的,但是在使用中需要注意一些小问题,下面通过例子来说明。首先看下面的t1表。 1、如果直接用如下sql语句是会报错:Incorrect usage of UNION and ORDER BY。 SELECT * FROM ...
C++Union数据类型大小端问题测试源码
union变量在多个函数调用时涉及到变量定义及外部声明的问题,该文档所述该类型变量的声明和调用已在亲测编译通过,希望对大家有所帮助
1,对于union,对齐的大小是最大的基本元素的对齐大小;对象的大小必须是该基本元素大小的整数倍; 2,对于struct,对齐的大小也是最大的基本元素的对齐大小,对象的大小需要考虑元素的对齐,并且需要是最大基本元素...
UNION和UNION ALL是数据库中用于合并查询结果集的操作符,它们有一些关键的区别。 UNION操作符将两个或多个SELECT语句的结果集合并为一个结果集,并自动去除其中的重复行。这意味着,如果两个结果集中有相同的行,...
sql利用union all行转列 利用最原始的方法进行行转列 简单明了
UnionFind.h
1.34 用UNION替换OR (适用于索引列) 21 1.35 用IN来替换OR 22 1.36 避免在索引列上使用IS NULL和IS NOT NULL 22 1.37 总是使用索引的第一个列 23 1.38 ORACLE内部操作 23 1.39 用UNION-ALL 替换UNION ( 如果有可能的...
此资源为.txt文件,里面描述了sql中union的用法和案例,如果需要可以下载