MySQL Syntax Query for Combining columns in one -
please. me. how combine records of multiple columns in 1 new column ? in table have 3 columns named pio1, pio2 , pio3. want combine records of 3 columns in 1 column.
this column [1]: http://i.stack.imgur.com/jonh4.png , output want show [2]: http://i.stack.imgur.com/akumb.png
try this
alter table <tablename> add combocolumn varchar(3000); update <tablename> set combocolumn = concat (po1,po2,po3);
this assumes "combine" means concatenate without adding separator, , 3000 characters enough.
Comments
Post a Comment