Oracle 学习第二天 (作业)
一.单行函数
-
显示"hello world"符串大写的形式
select upper ('hello world') from dual;
-
显示"HELLO WORLD"符串小写的形式
select lower ('HELLO WORLD') from dual;
-
显示"hello world"符串的首字母大写,其他小写的形式
select initcap ('hello world') as result from dual;
-
将hello字符串后拼接world字符串,使用两种方式实现
select concat('hello','world') as result from dual; select 'hello'||'world' from dual;
-
求hello world字符串的第三个字符到第八个字符的子字符串? substr(str,index1, index2)第一个参数为要截取的字符,index1 为起始位,index2是从起始位开始算有多 少个字符
select substr