Replace Spaces in Column Name with Underscore MySQL -
i have inherited mysql database contains many columns in many tables have spaces in names. have been asked change spaces in column names underscores. there way script?
i thought can them listed select information_schema.... not sure how can replacement.
my logic if column name contains space, replace underscore. not sure how that.
if have privileges, following:
update columns set column_name = replace(column_name, ' ', '_')
but likely, cant alter schema.
Comments
Post a Comment