oracle
逍遥天下007
无所不能
展开
-
oracle存储过程模板(带循环、跳出循环,以及返回)
create or replace procedure Test_myprocedure is CURSOR CUR_TEST IS --声明显式游标 SELECT user_id ECODE,username ENAME FROM sys_user; CUR CUR_TEST%ROWTYPE; --定义游标变量,该变量...原创 2019-03-23 10:30:31 · 442 阅读 · 0 评论 -
要显示每月的每一天的数据,哪怕那天没有数据也要显示出来日期
select to_char(to_date('201908','yyyymm')+(rownum-1),'dd') DAY_IDfrom dual connect by rownum<=to_number(to_char(last_day(to_date('201908','yyyymm')),'dd'))原创 2019-08-09 16:40:37 · 572 阅读 · 0 评论 -
oracle获取某个月所有的天数列表
select rownum from dual connect by rownum<=to_number(to_char(last_day(to_date('201902','yyyymm')),'dd'))select to_date('200809','yyyymm')+(rownum-1) s_date from dual connect by rownum&l...原创 2019-08-15 11:29:46 · 3103 阅读 · 0 评论