欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

SQLServer 2005 和Oracle 語法的一點差異小結

 更新時間:2011年04月15日 01:05:34   作者:  
Microsoft SQL Server 和Oracle 語法的一點差異小結,需要的朋友可以參考下。
1.獲取系統(tǒng)當前時間
SQL Server 2005:
select getdate()
Oracle:
select sysdate from dual
2.獲取年月日
SQL Server 2005:
復制代碼 代碼如下:

select year(getdate()) --2011
select month(getdate()) --3
select day(getdate()) --23

Oracle:
復制代碼 代碼如下:

select to_char(sysdate,'yyyy') from dual --2011
select to_char(sysdate,'mm') from dual --03
select to_char(sysdate,'dd') from dual --23
q 季度
hh 小時(12)
hh24 小時(24)
mi 分
ss 秒
D 周中的星期幾

相關文章

最新評論