The syntax is as follows:
TIMESTAMPADD(SQL_TSI_interval, init_expr, timestamp_expr
e.g if you want to add a month to a given date; it can be done as follows:
TIMESTAMPADD(SQL_TSI_MONTH, 1, given_date
Other SQL_TSI intervals are:
- SQL_TSI_SECOND
- SQL_TSI_MINUTE
- SQL_TSI_HOUR
- SQL_TSI_DAY
- SQL_TSI_WEEK
- SQL_TSI_QUARTER
- SQL_TSI_YEAR
No comments:
Post a Comment