Complete the code to remove spaces from both ends of the string ' hello '.
SELECT [1](' hello ') AS trimmed_text;
The TRIM function removes spaces from both the left and right ends of a string.
Complete the code to remove spaces only from the left side of the string ' world '.
SELECT [1](' world ') AS left_trimmed;
LTRIM removes spaces only from the left (start) of the string.
Fix the error in the code to remove spaces only from the right side of the string ' data '.
SELECT [1](' data ') AS right_trimmed;
RTRIM removes spaces only from the right (end) of the string.
Fill both blanks to remove spaces from the left and right sides of the string ' example '.
SELECT [1]([2](' example ')) AS cleaned;
Using RTRIM inside LTRIM removes spaces from right first, then left.
Fill all three blanks to remove spaces from both ends and then convert the string ' SQL ' to uppercase.
SELECT UPPER([1]([2]([3](' SQL ')))) AS result;
First, TRIM removes spaces both sides, then RTRIM and LTRIM are redundant but here the order is TRIM then RTRIM then LTRIM (though TRIM alone suffices). Finally, UPPER converts to uppercase.