translate的主要作用是提取,替换字符串,其作用有时候和replace差不多.具体看下面的例子
select translate('liyan4h123ui','#liyanhui','#') from dual
结果:4123
select translate('asadad434323', '#0123456789','#') from dual
结果:asadad
select TRANSLATE('kkaxksx', 'kx', '12') from dual
结果:11a21s2
select * from (
select a2,count(*) from A1 group by a1,
select a2,count(*) from A2 group by a2,
select a3,count(*) from A3 group by a3,
) order by 2 //2 在这里的意思是按照第二列的值排序
阅读(3007) | 评论(1) | 转发(0) |