两条SQL语句可能前面一条没加条件查了个总表,第二个查了一个时间段的
select a,b from test
select a,b from test where c=1
用查询分析器查出来时分开来的,我是想只要一个列名,数据统计到一起去,如何做到?求高人指点!!!!!!!
------解决方案--------------------
select a,b from test
union
select a,b from test where c=1
------解决方案--------------------
- SQL code
select a,b from test union--去掉上下两个语句重复的数据行select a,b from test where c=1select a,b from test union all--不去掉上下两个语句重复的数据行,保留两语句的所有结果航select a,b from test where c=1
------解决方案--------------------