KnowledgeBoat Logo

Informatics Practices

Predict the output of the following query :

SELECT LCASE(MONTHNAME('2023-03-05'));
  1. May
  2. March
  3. may
  4. march

SQL Queries

3 Likes

Answer

march

Reason — The MONTHNAME() function in MySQL returns the name of the month for a given date. In this case, the date '2023-03-05' corresponds to March, so MONTHNAME('2023-03-05') will return "March". Then LCASE() function is used to convert the result to lowercase, resulting in "march" as the output.

Answered By

2 Likes


Related Questions