我需要獲取整數的最後兩位數。放置在表中的每個元素都是全年的,即。 YYYY
,我只希望最後兩位數字,使所有的字段顯示SQL獲取整數的後兩位數
YEAR
----
09
00
89
其中initialy場是
YEAR
----
2009
2000
1989
編輯:我得到一個投訴說,
HINT: No function matches the given name and argument types. You might need to add explicit type casts.
當我嘗試
select right(cast(year as char),2) from subjects;
當我試圖用LEN()或length()函數在PostgreSQL裏它說,功能沒有按」 t存在。 – Madhusudan 2015-05-19 08:43:33