Vidyalelo
MySQL · Q276

MySQL

Programming · MySQL · question 276

Q276

The date and time datatype that stores time value in 'hh:mm:ss' format is . . . . . . . .

A.
DATE
B.
TIME
Answer
C.
DATETIME
D.
TIMESTAMP

Answer: Option B

Solution

Answer: Option B
Solution:
This question is about different data types in MySQL that store time values. We need to find the data type that specifically stores time in the format 'hh:mm:ss'.
Let's look at the options:
A: DATE - This data type stores only dates in the format 'YYYY-MM-DD'. It doesn't store time information.
B: TIME - This is the correct answer! The TIME data type stores time values in the format 'hh:mm:ss' as required.
C: DATETIME - This data type stores both date and time information in the format 'YYYY-MM-DD hh:mm:ss'.
D: TIMESTAMP - This is similar to DATETIME but also has additional features like automatic updates and time zone handling.
Therefore, the correct answer is Option B: TIME.