Complete the code to create a column that stores date values only.
CREATE TABLE events (event_date [1]);The DATE type stores only date values (year, month, day) without time.
Complete the code to insert the current date and time into a DATETIME column.
INSERT INTO logs (log_time) VALUES ([1]());NOW() returns the current date and time, suitable for DATETIME columns.
Fix the error in the query to select rows where the time is after 14:00:00.
SELECT * FROM shifts WHERE shift_start > '[1]';
MySQL TIME values require the format HH:MM:SS. So '14:00:00' is correct.
Fill both blanks to create a table with a TIMESTAMP column that defaults to the current timestamp.
CREATE TABLE user_logins (login_time [1] DEFAULT [2]);
TIMESTAMP columns can have a default value of CURRENT_TIMESTAMP to store the current time automatically.
Fill all three blanks to select rows where the date is after 2023-01-01 and time is before 18:00:00.
SELECT * FROM appointments WHERE appointment_date > '[1]' AND appointment_time < '[2]' AND appointment_date < '[3]';
The query filters dates after 2023-01-01, times before 18:00:00, and dates before 2024-01-01.