create table att(
owner varchar2(256),
type varchar2(256),
value varchar2(256)
);
insert into att (OWNER, TYPE, VALUE) values ('sys', 'table', '20');
insert into att (OWNER, TYPE, VALUE) values ('sys', 'index', '46');
insert into att (OWNER, TYPE, VALUE) values ('sys', 'table', '28');
insert into att (OWNER, TYPE, VALUE) values ('sys', 'table', '15');
select * from att pivot(max(value) for type in('table','index'))
select * from att
pivot(
max(value) -- 聚合函数
for type -- 行转列标准
in('table','index') -- 行转列列取值和顺序
)