Oracle 的简单应用1

 查看表的结构: desc 表名

select 语句:

select [* ,distinct][field as 别名] from <tab>  where condition(group by field having field ..)(order by ..)

 注:GROUP BY语句用来与聚合函数(aggregate functions such as COUNT, SUM, AVG, MIN, or MAX.)联合使用

 

 having 通常和 group by 联合使用,用来过滤某个条件下的数据

 

 来个完整的

 
字符函数:
lower(字段) 大->小
upper(字段) 小->大
initcap(字段)首字母->大写

 Concat A, B 连接符
lpad(字符串,位数,补齐的字符)
rpad(字符串,位数,补齐的字符)

concat empno和sal,deptno 左补齐*   ,这里注意 单引号和双引号的应用

下面是一些常用的函数,要记住

暂时就这些吧,以后有时间在继续学习和分享

猜你喜欢

转载自blog.csdn.net/qq_16116183/article/details/82829435