假设有表 tcol1 col2 col3
-------------------
a t null
a null s
b t null
b null s期望的得到的结果集
col1 col2 col3
--------------------
a t s
b t s请问sql语句怎么写急急急
-------------------
a t null
a null s
b t null
b null s期望的得到的结果集
col1 col2 col3
--------------------
a t s
b t s请问sql语句怎么写急急急
解决方案 »
- win7 安装oracle11g成功后,创建数据库实例时出错。数据库服务未注册到监听程序
- 求教:关于oracle job的问题
- 哪位大哥帮忙写一个15位身份证号码转化为18位的Oracle函数?
- 存储过程中,如何将指定的某几张表导出生成DMP格式文件呢
- oracle9i居然使用的两个监听端口???
- oracle 10g比 9i有什么优势吗
- 如果写这样的SQL语句
- RMAN 恢复数据库失败,求救!在线急等!
- 请问有两个BETWEEN的SELECT生成的表,参否并在一张表里显示(高手请进,在线等待)
- 求助一条SQL语句
- ORACLE 归档模式的使用
- 求助!!!新服务器上windows 2012r2datacenter版,安装oracle11g impdp导入异常的慢
(select 'a' as col1,'t' as col2, null as col3 from dual
union all
select 'a' as col1,null as col2, 's' as col3 from dual
union all
select 'b' as col1,'t' as col2, null as col3 from dual
union all
select 'b' as col1,null as col2, 's' as col3 from dual
)
select col1,
max(col2) col2,
max(col3) col3
from tmp
group by col1