If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How do I move the records of a column of Table1 to Table2 by creating the column

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-16-09, 00:08
devleen devleen is offline
Registered User
 
Join Date: Mar 2009
Posts: 1
How do I move the records of a column of Table1 to Table2 by creating the column

Hi,

I have got two tables: Table1 and Table2

I need to move the column(say col1) records of Table1 to Table2.
Note: col1 does not exists in Table2. So I need to add the column col1 to Table2 and then move the records of col1 from Table1 to Table2.
Please suggest me as to how to proceed with this...

Thanx in advance.

Dev.
Reply With Quote
  #2 (permalink)  
Old 03-16-09, 03:10
dgreenhouse dgreenhouse is offline
Registered User
 
Join Date: Mar 2009
Posts: 11
It depends...

Are the rows in both tables already in sorted order?

If not, is there an index or other type of record identifier in both tables that can be used to determine which column/row value from Table1 should go with which record in Table2 after the new column has been added?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On