The ltrim and rtrim functions. Now lets find out which of our students have been bright enough to graduate. This is because we are comparing 'Smith ' with 'Smith' and 'Green ' with 'Smith' hence no matches. This is where we use the rtrim function.
Lets try our select statement again using the rtrim function.
The length function. The function length does just what you think it does, it will return the number of characters contained within a column. Smith 5 Notice the length returned is 5, the length of the name 'Smith'. The lpad and rpad function. The functions lpad and rpad are the opposites of ltrim and rtrim in that they will pad a column with spaces to either the right or left to fill the column.