/* 10분 */
SELECT SEQ, TITLE

  FROM TABLE_NAME

 WHERE TRUNC( MOD( (SYSDATE - TO_DATE(REG_DT, 'YYYYMMDDHH24MISS'))*24*60, 24*60 ) ) = 10


/* 2시간 */
SELECT SEQ, TITLE

  FROM TABLE_NAME

 WHERE TRUNC( MOD( (SYSDATE - TO_DATE(REG_DT, 'YYYYMMDDHH24MISS'))*24*1, 24*1 ) ) = 2


/* 1일 */
SELECT SEQ, TITLE

  FROM TABLE_NAME

 WHERE TRUNC( MOD( (SYSDATE - TO_DATE(REG_DT, 'YYYYMMDDHH24MISS'))*24*1, 24*1 ) ) = 24


+ Recent posts