zoukankan      html  css  js  c++  java
  • 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

  • 相关阅读:
    MSMQ实现自定义序列化存储
    流程部署的查询、删除、流程
    使用trello管理你的项目
    CentOS 6.4 编译安装 gcc 4.8.1
    jquery实现无限滚动瀑布流实现原理
    系统分析员备考之经济管理篇(二)
    架构、架构师和架构设计
    ASP.net Web API综合示例
    c中函数参数传递
    准备抽象NHibernate和EntityFramework
  • 原文地址:https://www.cnblogs.com/Han-org/p/7278488.html
Copyright © 2011-2022 走看看