mysql> explain select * from t100 union all select * from t200;
+----+--------------+------------+------+---------------+------+---------+------+------+-----------------+
| id | select_type | t...
The UNION ALL operator may be what you are looking for.
With this operator, you can concatenate the resultsets from multiple queries together, preserving all of the rows from each. Note that a UNI...
mysql> explain select * from t100 union all select * from t200;
+----+--------------+------------+------+---------------+------+---------+------+-----...
http://www.runoob.com/sql/sql-union.html
使用sql server数据库
构造数据
DECLARE @sql NVARCHAR(4000);
IF OBJECT_ID('UnionTest1') IS NOT NULL
BEGIN
PRINT 'Table UnionTest1 exist, will drop ...
作用:用于连接两个结果,注意两个表属性必须相同 SELECT TOP 1 * FROM RoadCheckData ORDER BY ID DESCUNION ALLSELECT TOP 1 * FROM RoadCheckData ORDER BY ID ASC
长风破浪会有时,直挂云帆济沧海!
...