Change multiple columns in one expression

I use a query to change the encoding of a column

ALTER TABLE `media_value_report` CHANGE `index_page_body` `index_page_body` TEXT CHARACTER SET utf8 NULL DEFAULT NULL 

I want to do this for other columns main_title, landing_page_body. But I get error # 1064 at runtime. Can I change multiple columns in a single query?

I tried, but found in a goog search that could not be changed in a single request.

+31
sql mysql mysql-error-1064 alter-table
Jun 01 2018-12-12T00: 00Z
source share
1 answer

In the documentation, you can bind alter_specifications with a comma:

 ALTER TABLE `media_value_report` CHANGE col1_old col1_new varchar(10), CHANGE col1_old col1_new varchar(10), ... 
+60
Jun 01 '12 at 8:25
source share



All Articles