select to_date('2018','yyyy') from dual為什么是系統月初時間?
例如:select to_date('2018','yyyy') from dual
結果是:20180601
uj5u.com熱心網友回復:
官方檔案寫著呢https://docs.oracle.com/database/121/SQLRF/sql_elements001.htm#SQLRF0021
The 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://www.uj5u.com/shujuku/65077.html
標籤:開發
上一篇:oracle遞回查詢問題
下一篇:Oracle判斷陳述句寫法求助
