티스토리 뷰

Database/SQL

SQL - BETWEEN

파란크리스마스 2008. 3. 26. 15:39
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')

댓글
300x250
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
글 보관함