select组合查询

来源:互联网 发布:linux 命令行修改文件 编辑:程序博客网 时间:2024/05/18 13:31

select

         t1_id,

         t1_name,

         t2_id,

         t2_name

from

(select id as t1_id,

           (case when name is null then '空' end) as t1_name    --判断name为空时指定一个值

     from test1

)tb1,

(select id as t2_id,

           name as t2_name 

    from test2

)tb2

);

原创粉丝点击