Combine Two Column Fields From ONE Table [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this questionI made a new question cause I don't understand the other answers开发者_如何学运维.
I want to get clear here. I have a table named "experiences". It has THREE FIELDS: id, experience_name, years. I want to combine the TWO COLUMNS : experience_name and year and name it like.. experience Then i want to make a new table and name it resume_experiences and put the COLUMNS id and experience can you guys please help me.. How am i gonna do it? OUTPUT SHOULD BE: table name: resume_experiences fields: ID | EXPERIENCETry this:
INSERT INTO resume_experiences
(id, experience)
SELECT id, CONCAT(experience_name, ' ', CONVERT(years,UNSIGNED))
FROM experiences
CREATE TABLE IF NOT EXISTS `resume_experiences `
SELECT `id`, CONCAT(`experience_name`, ' ', `years`) AS `experience`
FROM `experiences`;
精彩评论