0
0
MySQLquery~10 mins

NOW, CURDATE, CURTIME in MySQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to get the current date and time using MySQL.

MySQL
SELECT [1]();
Drag options to blanks, or click blank then click option'
ANOW
BCURTIME
CCURDATE
DCURRENT_TIME
Attempts:
3 left
💡 Hint
Common Mistakes
Using CURDATE() when you want date and time.
Using CURTIME() when you want date and time.
2fill in blank
medium

Complete the code to get only the current date in MySQL.

MySQL
SELECT [1]();
Drag options to blanks, or click blank then click option'
ACURRENT_TIMESTAMP
BCURDATE
CNOW
DCURTIME
Attempts:
3 left
💡 Hint
Common Mistakes
Using NOW() when only the date is needed.
Using CURTIME() which returns only time.
3fill in blank
hard

Fix the error in the code to get the current time in MySQL.

MySQL
SELECT [1]();
Drag options to blanks, or click blank then click option'
ANOW
BCURRENT_DATE
CCURDATE
DCURTIME
Attempts:
3 left
💡 Hint
Common Mistakes
Using CURDATE() when time is needed.
Using NOW() when only time is needed.
4fill in blank
hard

Fill both blanks to select current date and current time separately.

MySQL
SELECT [1]() AS today, [2]() AS now_time;
Drag options to blanks, or click blank then click option'
ACURDATE
BNOW
CCURTIME
DCURRENT_TIMESTAMP
Attempts:
3 left
💡 Hint
Common Mistakes
Using NOW() for both blanks.
Mixing CURDATE() and NOW() in wrong order.
5fill in blank
hard

Fill all three blanks to select current date, current time, and current date and time.

MySQL
SELECT [1]() AS current_date, [2]() AS current_time, [3]() AS current_datetime;
Drag options to blanks, or click blank then click option'
ACURDATE
BCURTIME
CNOW
DCURRENT_DATE
Attempts:
3 left
💡 Hint
Common Mistakes
Using NOW() for all three blanks.
Confusing CURDATE() and CURRENT_DATE() functions.