Informatics Practices
What will be returned by the given query ?
SELECT concat("It", "was", "ok");
- "It was ok"
- "It wasok"
- "Itwasok"
- "Itwas ok"
SQL Queries
1 Like
Answer
"Itwasok"
Reason — The CONCAT() function in MySQL is used to concatenate multiple strings into a single string. When we use SELECT CONCAT("It", "was", "ok");, it combines the strings "It", "was", and "ok" without any spaces or additional characters between them.
Answered By
1 Like
Related Questions
What will be returned by the given query ?
SELECT INSTR("INDIA", "DI");- 2
- 3
- -2
- -3
If the substring is not present in a string, the INSTR() returns:
- -1
- 1
- NULL
- 0
Predict the output of the following query :
SELECT LCASE(MONTHNAME('2023-03-05'));- May
- March
- may
- march
To remove the leading and trailing space from data values in a column of MySQL Table, we use
- Left()
- Right()
- Trim()
- Ltrim()