Sorry, I missed a quote in the concat... here's SQL that works:
select
concat('update mytable set ',
GROUP_CONCAT(concat(column_name,' = LTRIM(',column_name,') ')),
';'
)
FROM (
select
1 as random_dimension,
column_name
from
information_schema.columns
where
table_schema = 'my_database'
and table_name = 'mytable'
) tab_cols
group by random_dimension