zoukankan      html  css  js  c++  java
  • oracle sql 函数

    (7)查询日期之间的数据 
    例如查询student表中出生日期(birthday)在’2016-01-01’ 和’2017-01-01’之间的数据:

    select * from student where birthday between '2016-01-01' and '2017-01-01';   

    对于日期不规则的数据需要先转格式,如下:

    select * from student where to_date(student.birthday,'YYYY-MM-DD') between to_date('2016/01/01','YYYY-MM-DD')  and to_date('2017/01/01','YYYY-MM-DD');

    (8)查询小于或者大于某日期的数据 
    例如查询student表中出生日期(birthday)小于等于’2016-01-01’的数据:

    select * from student where birthday <='2007-1-13';

    对于日期不规则的数据需要先转格式,如下:

    select * from student where to_date(student.birthday,'YYYY-MM-DD') <= to_date('2016/01/01','YYYY-MM-DD');
  • 相关阅读:
    监听
    用户管理
    oracle网络
    实例 参数
    存储管理
    oracle 体系
    实例
    修改
    集合操作
    17.08.18
  • 原文地址:https://www.cnblogs.com/lzh_527/p/8520210.html
Copyright © 2011-2022 走看看