官方文档写着呢 https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021The default date values are determined as follows:The year is the current year, as returned by SYSDATE.The month is the current month, as returned by SYSDATE.The day is 01 (the first day of the month).The hour, minute, and second are all 0. 你要是想要一月一日,用这个 select trunc(to_date('2018', 'yyyy'), 'y') from dual;
https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021The default date values are determined as follows:The year is the current year, as returned by SYSDATE.The month is the current month, as returned by SYSDATE.The day is 01 (the first day of the month).The hour, minute, and second are all 0.
你要是想要一月一日,用这个
select trunc(to_date('2018', 'yyyy'), 'y') from dual;