DECODE(value, if1, then1, if2,then2, if3,then3, . . . else )
select sid,serial#,username,
DECODE(command,
0,’None’,
2,’Insert’,
3,’Select’,
6,’Update’,
7,’Delete’,
8,’Drop’,
‘Other’) command
from v$session where username is not null;
sign函数
sign(x):x>0 sign=1;
x=0 sign=0;
x<0 sign=-1