Today I want to try how to TRIM in select, using database DB2.
We can use function RTRIM (for TRIM right space) or LTRIM (TRIM left space).

For example.. assume that we have column field1 in table transactions with datatype varchar and have value ‘ ¬† hello':

SELECT LTRIM(field1) FROM transactions

Cobe above will return ‘hello’¬†respectively. So simple :)