Oracle基础教学:各类语句及函数讲解
1.select语句
2.数据操纵语言(dml语句)
insert, update, delete
3.数据定义语言(ddl语句)
create, alter, drop, rename, truncate
4.事务控制语句
commit, rollback, savepoint
5.数据控制语言(dcl语句)
grant【授权】, revoke【回收】
单值函数
组函数
聚合函数
分析函数
开窗函数
分析函数
row_number() over(partition by … order by …)
rank() over(partition by … order by …)
dense_rank() over(partition by … order by …)
count() over(partition by … order by …)
max() over(partition by … order by …)
min() over(partition by … order by …)
sum() over(partition by … order by …)
avg() over(partition by … order by …)
first_value() over(partition by … order by …)
last_value() over(partition by … order by …)
lag() over(partition by … order by …)
lead() over(partition by … order by …)
select id,name,date1 from (select id,name,date1,row_number() over(partition by id order by date1 desc) as rn from t1)t where t.rn=1;
上一篇: 建立动态下拉式选单(三阶层)
下一篇: 爆囧,老婆是个厉害角色