日期:2014-05-17 浏览次数:21031 次
create table types (a varchar2(10),b number(10,1),c number(10,1),d number(10,1),e number(10,1)); insert into types values ('abc',1,2,0.5,1); insert into types values ('cde',2,1,0.5,1); insert into types values ('fgh',0.5,1,2,0); insert into types values ('ijk',0,1,1,2); insert into types values ('lmn',2,2,1,0.5); select wm_concat(a) a,max(b) b,max(c) c,max(d) d,max(e) e from types where a in ('abc','lmn'); a b c d e ----------------------------------------- 1 abc,lmn 2 2 1 1 select c*d from types; c*d ------------------ 1 1 2 0.5 3 2 4 1 5 2