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

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

android - How to create dynamically Fragment pager adapter -

1111. appearing after print sequence - php -