开发者

Combine Two Column Fields From ONE Table [closed]

开发者 https://www.devze.com 2023-04-03 04:08 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question

I 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 | EXPERIENCE


Try 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`;
0

精彩评论

暂无评论...
验证码 换一张
取 消