Informatics Practices
Predict the output of the following query :
SELECT LCASE(MONTHNAME('2023-03-05'));
- May
- March
- may
- 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
If the substring is not present in a string, the INSTR() returns:
- -1
- 1
- NULL
- 0
What will be returned by the given query ?
SELECT concat("It", "was", "ok");
- "It was ok"
- "It wasok"
- "Itwasok"
- "Itwas ok"
To remove the leading and trailing space from data values in a column of MySQL Table, we use
- Left()
- Right()
- Trim()
- Ltrim()
What will be returned by the given query ?
SELECT Round(153.669, 2);
- 153.6
- 153.66
- 153.67
- 153.7