CBSE Class 12 Informatics Practices Question 54 of 81

MySQL Functions — Question 5

Back to all questions
5
Question

Question 2(iv)

Explain the DAYNAME() SQL function using suitable examples.

Answer

The DAYNAME() function returns the name of weekday for date. The syntax is DAYNAME(date). For example,

SELECT DAYNAME('2024-05-20');
Output
+-----------------------+
| DAYNAME('2024-05-20') |
+-----------------------+
| Monday                |
+-----------------------+