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

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -