2013-01-21 37 views

回答

1
select to_char(date_value,'MM') from dual; 
select to_char(date_value,'Mon') from dual; 
select to_char(date_value,'Month') from dual; 

+0

你認爲什麼「提取」語法? (''從雙''選擇提取(從date_value的月份)) –

+0

@wolφi沒關係,主要是因爲是ANSI SQL標準,但我使用to_char作爲習慣。 –

+0

謝謝。來自dual的SELECT to_char(date_value,'MM-YYYY')也很好:D謝謝 – Drew

1

如果您想得到這樣01月份數那就試試這個

select to_char(date_val,'MM') from dual 

對於Mon試試這個

select to_char(date_val,'Mon') from dual 

對於Month試試這個

select to_char(date_val,'Month') from dual 
相關問題