Informatics Practices
What will be printed by the given query ?
SELECT LENGTH("WINNER");
- 7
- 6
- 8
- 9
SQL Queries
1 Like
Answer
6
Reason — The LENGTH()
function in MySQL returns the length of the string specified as its argument in characters. In the given query, the string "WINNER" has a length of 6 characters, so the LENGTH()
function will return 6.
Answered By
1 Like
Related Questions
Which of the following SQL functions does not belong to the Math functions category ?
- POWER()
- ROUND()
- LENGTH()
- MOD()
Which of the following is not a valid aggregate function in MYSQL ?
- COUNT()
- SUM()
- MAX()
- LEN()
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