728x90

출처

http://www.w3schools.com/sql/sql_between.asp

select decode(statusid,1,1,0) as f1,
       decode(statusid,2,1,0) as f2,
       decode(statusid,3,1,0) as f3,
       decode(statusid,4,1,0) as f4
  from jsp_board
 where write_date
       BETWEEN to_date(to_char(sysdate,'yyyymmdd') || '000000','yyyymmddhh24miss')
       and to_date(to_char(sysdate + 1,'yyyymmdd') || '000000','yyyymmddhh24miss')

728x90

+ Recent posts