954,566 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

INSERT columns

Hey hey

I have two tables with a lot of data, i need to insert certain column values from table one into table two - eg

Table one column = First_Name
Table two column = Name

I need to get all the values in table one (First_Name) into table two (Name), these records should be appended..

Any help would really be appreciated ?

cVz
Junior Poster
140 posts since Mar 2008
Reputation Points: 29
Solved Threads: 7
 

Something like this should work:

-- set where to insert
INSERT INTO Table_one (First_Name) 
-- select values to insert
SELECT Name FROM Table_Two
-- you may need to specify which ones from Table_two to insert
-- using a WHERE clause


HTH :)

darkagn
Veteran Poster
1,197 posts since Aug 2007
Reputation Points: 404
Solved Threads: 200
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You