SQL 날짜관련

bong bong·2024년 2월 1일

SQL문
초 분 시간 1일 한달 일년

select

한달전

to_char(add_months(sysdate,-1),'yyyy-mm-dd')

일년전

to_char(add_months(sysdate,-12),'yyyy-mm-dd')

하루전

to_char(sysdate-1,'yyyy-mm-dd')

from dual

profile
let's go invent tomorrow rather than worrying about what happened yesterday - Steven Paul Jobs

0개의 댓글