Instruction
Okay! There is one more syntax for intervals. It is not in SQL Standard, but most databases support it. The syntax is as follows:
INTERVAL '2' HOURINTERVAL '3' DAYINTERVAL '5' MONTHINTERVAL '1' YEAR- etc.
In MySQL you use the syntax without the apostrophes: INTERVAL 2 HOUR, INTERVAL 3 DAY, etc.
As usual, you can add such intervals to a timestamp/date (or subtract it):
SELECT id, launched + INTERVAL '3' MONTH FROM aircraft;
The above query will add 3 months to the timestamp stored in the column launched.
Exercise
PerfectAir has changed its schedules. All flights which depart after 1:00 PM have been delayed by 1 hour. Show the code of each route together with the new departure (as new_departure) and arrival times (as new_arrival).
Stuck? Here's a hint!
Use + INTERVAL '1' HOUR.



