Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Boolean
Date and time
9. Time
Summary

Instruction

Very good! The next data type we're going to learn is time. The format for this type is hh:mm:ss, where hh stands for hour (using a 24-hour clock), mm for minutes, and ss for seconds. It's used to store time data (e.g., in timetables).
Important: A time column also requires you to enclose data in apostrophes.

Please note that this data type is absent from many databases.

Exercise

When Peter found out about the new data type, he immediately added another column called precise_time to his table. The table is now created like this:

CREATE TABLE payment (
  user_id int,
  amount decimal(6, 2),
  day date,
  precise_time time
);

Insert a row into the new table. The user_id is 14, the amount is $23.45, the day is August 2, 2019, and the precise_time is 2:00 pm exactly. (That's 14:00 in SQL time!)

Stuck? Here's a hint!

The day should equal '2019-08-02' and the precise_time should be '14:00:00'.