我需要获取整数的最后两位数。放置在表中的每个元素都是全年的,即。 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