Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9115799
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T04:31:07+00:00 2026-06-17T04:31:07+00:00

I am wanting to move items from one table into another using MySQL. This

  • 0

I am wanting to move items from one table into another using MySQL.

This is what I currently use:

INSERT INTO items_rooms (item_id, room_id,x,y,n)  
SELECT id, room_id,x,y,z
  FROM `items_phoenix`

This works, however I am wanting to insert multiple values into one column instead of each values in different columns.

For example:

In table items_rooms, I would like values x and y from items_phoenix to be placed into one column in items_rooms.

If x = 5 and y = 2, can I save it into items_rooms like this: one column: 5.2 instead of different columns for each values?

Sorry if this is confusing!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T04:31:09+00:00Added an answer on June 17, 2026 at 4:31 am

    You can use expressions in your SELECT column-list. As long as the columns in the select-list and the columns in the destination table match in number and data type, you can do something like this:

    INSERT INTO items_rooms (item_id, room_id, x_dot_y, n)  
    SELECT id, room_id, CONCAT(x,'.',y), z
      FROM `items_phoenix`
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've written some code that will copy and move files from one folder to
I'm wanting to start a WPF application using caliburn.micro so I can use TDD
So I needed to move a large package from the default src to another
I'm new to Actionscript 3 and I'm wanting to allow a circle to move
Wanting to integrate aspects of SharePoint into an existing website - rather than integrating
I'm wanting to extract a zip file loaded with images into memory in some
I am wanting to display one list element at a time. Ideally, the first
I'm wanting to use a php variable as the destination email for Amazon SES
I have a client that I'm wanting to move to a virtual private server.
I'm wanting to use an ORM tool for an asp.net web app I'm working

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.