What would be the proper syntax used to run an update query on a table to remove all spaces from the values in a column?
My table is called users and in
UPDATE customers SET first_name = TRIM (TRAILING FROM first_name ) where id = 1
For example, if you want to remove spaces from the beginning of a string, you use the following syntax:
TRIM(LEADING FROM string) The following syntax of the TRIM() function removes all spaces from the end of a string.
TRIM(TRAILING FROM string) And to remove all spaces at the beginning and ending of a string, you use the following syntax:
TRIM(BOTH FROM string)