SQL语句搜索中 union all 联合查询

select * from (    
            select * from(
                select * from (select  
                    id,
                    major_name as title,
                    createddate as shijian,
                    major_dense as miji,
                    '专业动态' as doctype
                from sf_majorinfo
                where status!='VO'

                union all

                select  
                    id,
                    tec_name as title,
                    createddate as shijian,
                    tec_dense as miji,
                    '技术信息' as doctype
                from sf_technology
                where status!='VO'
                union all

                select  
                    id,
                    spe_name as title,
                    createddate as shijian,
                    spe_dense as miji,
                    '标准规范' as doctype
                from sf_specification
                where status!='VO')a
                where  a.id in (Variables.indocid)
            ) where rownum < Variables.endNumber
        ) where rownum > Variables.startNumber

原文地址:https://www.cnblogs.com/Han-org/p/7278488.html