SQL Function: TRIM()

Definition:

Return provided string that removed the space characters before the first character and after the last character.


Command Syntax:

TRIM(string)

Command Example:

Table PLAYER
UID MESSAGE
010122  WOW!!!
010142   O M G  
010133 Excellent. 

Input:
SELECT UID,TRIM(MESSAGE) AS MESSAGE FROM STUDENT;

Output:
UID MESSAGE
010122 WOW!!!
010142 O M G
010133 Excellent.


‘NO head and NO tail.’By secondary 6 student

Comments