interval SQL code example
Example 1: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date`, INTERVAL 2 DAY)
WHERE id = 161
Example 2: postgresql today - 1 year
select now() - INTERVAL '1 YEAR';
Example 3: mysql add days to date
UPDATE classes
SET `date` = DATE_ADD(`date` , INTERVAL 2 DAY)
WHERE `id` = 161;