Informatics Practices
If the substring is not present in a string, the INSTR() returns:
- -1
- 1
- NULL
- 0
SQL Queries
2 Likes
Answer
0
Reason — When the substring is not found within the string, the INSTR()
function in MySQL returns 0.
Answered By
3 Likes
Related Questions
What will be printed by the given query ?
SELECT LENGTH("WINNER");
- 7
- 6
- 8
- 9
What will be returned by the given query ?
SELECT INSTR("INDIA", "DI");
- 2
- 3
- -2
- -3
What will be returned by the given query ?
SELECT concat("It", "was", "ok");
- "It was ok"
- "It wasok"
- "Itwasok"
- "Itwas ok"
Predict the output of the following query :
SELECT LCASE(MONTHNAME('2023-03-05'));
- May
- March
- may
- march