Recall & Review
beginner
What does
CURRENT_DATE return in SQL?CURRENT_DATE returns the current date from the system in the format YYYY-MM-DD, without the time part.Click to reveal answer
beginner
What is the difference between
CURRENT_DATE and CURRENT_TIMESTAMP?CURRENT_DATE returns only the date (year, month, day). <br>CURRENT_TIMESTAMP returns both the date and the current time (hours, minutes, seconds, and fractional seconds).Click to reveal answer
beginner
How can you use
CURRENT_TIMESTAMP in a SQL query?You can use
CURRENT_TIMESTAMP to get the exact date and time when a query runs. <br>Example: SELECT CURRENT_TIMESTAMP;Click to reveal answer
intermediate
Is
CURRENT_DATE affected by time zones in SQL?Yes,
CURRENT_DATE returns the date based on the database server's time zone settings.Click to reveal answer
intermediate
Can
CURRENT_TIMESTAMP be used to track when a record was inserted?Yes,
CURRENT_TIMESTAMP is often used in INSERT or UPDATE statements to record the exact date and time of the change.Click to reveal answer
What does
CURRENT_DATE return in SQL?✗ Incorrect
CURRENT_DATE returns only the date part, like 2024-06-01.Which SQL function returns both date and time?
✗ Incorrect
CURRENT_TIMESTAMP returns date and time together.If you want to store the exact time a record was created, which should you use?
✗ Incorrect
CURRENT_TIMESTAMP includes both date and time, perfect for tracking creation time.Does
CURRENT_DATE include the time of day?✗ Incorrect
CURRENT_DATE returns only the date, no time.Which of these is true about
CURRENT_TIMESTAMP?✗ Incorrect
CURRENT_TIMESTAMP returns both date and time.Explain what
CURRENT_DATE and CURRENT_TIMESTAMP return in SQL and when you might use each.Think about whether you need just the day or the full date and time.
You got /4 concepts.
Describe how time zones might affect the values returned by
CURRENT_DATE and CURRENT_TIMESTAMP.Consider where the database server is located and its clock settings.
You got /3 concepts.