sql 日期函数 加一天

select DateAdd (expire_date,1,'2012-06-24'),expire_date from A 为什么查不出来
ERROR: function dateadd(timestamp with time zone, integer, unknown) does not exist
LINE 2: select DateAdd (expire_date,1,'2012-06-24'),expire_date from...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.

********** 错误 **********

ERROR: function dateadd(timestamp with time zone, integer, unknown) does not exist
SQL 状态: 42883
指导建议:No function matches the given name and argument types. You might need to add explicit type casts.
字符:9

第1个回答  2012-03-27
select DateAdd (expire_date,1,'2012-06-24'),expire_date from A
你这个语句中第一个参数你对不对暂时还看不出,但是最后一个参数你传入的是一个字符串 ,它需要的是个日期格式.当然就不行了,需要转换,还有,如果你只是加一天的话,第一个参数固定写成day就可以
第2个回答  推荐于2018-03-22
select expire_date +1,expire_date from A
即可,oracle的日期能够直接相加本回答被提问者和网友采纳
第3个回答  2012-03-27
expire_date是什么?
DateAdd函数的用法:http://msdn.microsoft.com/zh-cn/library/ms186819.aspx