SQL - BETWEEN

Database/SQL 2008.03.26 15:39 Posted by 파란크리스마스

출처

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')

신고
TAG ,


 

티스토리 툴바