zoukankan      html  css  js  c++  java
  • 排序

    排序

    order by 列的名字 默认是从小到大
    例:select last_name,salary from employees order by salary;
    order by 列 desc 从大到小排序
    例:select last_name,salary from employees order by salary desc;
    字母默认是ABCD这样的顺序
    多行函数用来统计啊 求和啊 等等啊~~ 略略略略
    单行函数
    类型必须是完全一致才能进行比对
    to_char(hire_date,'dd-mon yy') 转换格式
    空值函数
    NVL (commission,0) 如果奖金不是空值就输出奖金 如果是空值就返回第二个函数0
    NVL2 有三个函数如果第一个参数不为空返回第二个 如果第二个不为空返回第三个
    if then else


    CASE 列 WHEN ‘值’ THEN 1.1*salary
    WHEN ‘值’ THEN 1.1*salary
    WHEN ‘值’ THEN 1.1*salary
    别名


    DECODE(列,‘值’,1.1*salary,
    ‘值’,1.2*salary,
    ‘值’,1.3*salary,
    )别名

  • 相关阅读:
    分页
    【移动】
    iOS
    内存数据库
    HOJ——T 2275 Number sequence
    HOJ——T 1867 经理的烦恼
    HOJ——T 2430 Counting the algorithms
    洛谷—— P2047 社交网络
    HDU——T 1166 敌兵布阵
    前端学习之jquery
  • 原文地址:https://www.cnblogs.com/luo102154/p/7259117.html
Copyright © 2011-2022 走看看