select
name,
decode(style,'yw',performance) yw,
decode(style,'sx',performance)sx,
decode(style,'wy',performance)wy,
decode(style,'wl',performance)wl
from table1
group by name;
name,
decode(style,'yw',performance) yw,
decode(style,'sx',performance)sx,
decode(style,'wy',performance)wy,
decode(style,'wl',performance)wl
from table1
group by name;
解决方案 »
- 新手 问个oracle问题 资深DBA赐教啊
- 求教下 怎么制定索引列
- 请高手指教(SQL查询)
- oracle 9i 备份
- Oracle9i中如何写正则表达式,急,见详细说明。谢谢
- 奇怪的问题dblink报0RA-12154:TNS :无法处理服务名错误,但TNSNAMES.ORA文件没有配置错,用相同的用户名,密码登陆数据库都没有问题
- 高手请进!!!!!关于ORACLE中的sql语句包含NOT EXISTS的问题
- 请帮忙写一个SQL
- 关于作业,谢谢,很急?
- 如何用java程序判断系统是否安装了Oracle,如果安装了,判断其是否可用
- ORACLE ERP 11i系统安装和技术支持。
- 请问在ORACLE8I中如何在建表示建立一个自动累加的列?
MAX(decode(style,'语文',performance)) 语文,
MAX(decode(style,'数学',performance)) 数学,
MAX(decode(style,'外语',performance)) 外语,
MAX(decode(style,'物理',performance)) 物理,
from your_table
group by name