Which of the following functions are string functions?
(A) LENGTH()
(B) TRIM()
(C) MOD()
(D) LEFT()
Which of the following functions are string functions?
(A) LENGTH()
(B) TRIM()
(C) MOD()
(D) LEFT()
Solution
✅ Correct Option: 1
LENGTH(), TRIM() and LEFT() work on text values, so they are string functions in SQL (MySQL).
LENGTH() returns the number of characters (or bytes) in a string, TRIM() removes leading and trailing spaces, and LEFT() returns a given number of characters from the start of a string.
Option 2, 3 and 4: MOD() is a numeric (math) function that returns the remainder of a division, e.g. MOD(10, 3) gives 1. It is not a string function.
Related questions:
2026: 29 May Shift 2
2026: 13 May Shift 2
2026: 23 May Shift 2
2025: 13 May Shift 2
2026: 23 May Shift 2