首页 > 代码库 > oracle 字符串操作

oracle 字符串操作

select upper(‘testmyname‘) from dual;  --转换为大写

select lower(‘testmyname‘) from dual; --转换为小写

select upper(substr(‘testmyname‘),5) from dual; --截取myname,并转换为大写

selec instr(‘testmyname‘,‘or‘) from dual; --查找字符‘or‘,返回0

select tim(‘  hi  ) from dual; --返回hi

select rpad(‘smith‘,10,‘月‘) as reft_star_smith,lpad(‘smith‘,10,‘月‘) as ri
ght_star_smith from dual;          --左右俩侧填充字符

oracle 字符串操作