2018-08-02数据库整理2
2018-08-02 本文已影响0人
小G仔
1.decode函数
转置函数
select count(*)total,sum(decode(to_char(hire_date,'YYYY'),'2005',1.0))"2005",
sum(decode(to_char(hire_date,'YYYY'),'2006',1.0))"2006"
from employees
2.INITCAP
假设c为一字符串.函数INITCAP()是将每个单词的第一个字母大写,其它字母变为小写返回.
3.alter 对列做操作
4.desc展示