/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* * Subtracting months */ UPDATE employee SET dateOfBirth = dateOfBirth - INTERVAL '1 months' /* * Adding months */ UPDATE employee SET dateOfBirth = dateOfBirth + INTERVAL '1 months' /* * You can use one of the following intervals *-------------------------------------------- * microseconds * milliseconds * second * minute * hour * day * week * month * quarter * year * decade * century * millennium */
URL: http://www.postgresql.org/docs/8.0/interactive/functions-datetime.html