开发者

Combine Two Column Fields From ONE Table [closed]

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜