关闭

oracle关联查询union all 讲解

312人阅读 评论(0) 收藏 举报
分类:

1、SELECT t.recid,t.szdq1,t.szdq2,t.f_nb_zjly_fsgzl1,t.f_nb_zjly_fsgzl2 FROM B_JH_ZIJLY T  where t.szdq1 is NOT NULL



2、select t.recid as recid,t.szdq1 as szdq,t.f_nb_zjly_fsgzl1 as f_nb_zjly_fsgzl from B_JH_ZIJLY T where t.recid = '123DC7C4FA95E76BD9F76E16079B4F43'
      union all
     select t.recid as recid,t.szdq2 as szdq,t.f_nb_zjly_fsgzl2 as f_nb_zjly_fsgzl from B_JH_ZIJLY T where t.recid = '123DC7C4FA95E76BD9F76E16079B4F43'


3、select t.szdq1 as szdq,t.f_nb_zjly_fsgzl1 as f_nb_zjly_fsgzl from B_JH_ZIJLY T where t.recid = '123DC7C4FA95E76BD9F76E16079B4F43'
       union all
     select t.szdq2 as szdq,t.f_nb_zjly_fsgzl2 as f_nb_zjly_fsgzl from B_JH_ZIJLY T where t.recid = '123DC7C4FA95E76BD9F76E16079B4F43'

0
0

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:7828次
    • 积分:606
    • 等级:
    • 排名:千里之外
    • 原创:50篇
    • 转载:22篇
    • 译文:1篇
    • 评论:2条
    文章分类
    最新评论