问题描述 SQL 查询优化 嵌套查询 sql server sql如下:select *from ( select subjectCOUNT(Subject) as cout from Questions where UserID ='banianji' and AskDate>'2011-01-01' and AskDate<'2014-01-01' group by Subject ) as a where a.cout= ( select MAX(cout)from ( select s
问题描述 pl/sql多条查询语句结果导出 有四条查询统计的语句,现在我想把结果导出去只能手动一个个复制出去,有没有办法能一次性全部导出去. 解决方案 用union all连接四条SQL. select count(discnt_code) from ucr_param.td_b_discnt where discnt_code like '30%' union all select count(discnt_code) from ucr_param.td_b_discnt where disc