Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie Q - How do you copy data from one table to another

Status
Not open for further replies.

dognobbler

Programmer
Jul 4, 2003
46
0
0
GB
I have two tables "profile" and "photovote" both of which have a column named "username". I want to copy the value of "username" from "profile" to "photovote" (which is currently empty.

I have tried doing

insert into photovote (username) values (select username from profile);

But this didn't work. Can anyone tell me how to do this.

Cheers

Andy
 
Hi,

You are searching in the wrong forum.

The answer for the questions is

insert into photovote (username) select username from profile;

This might help you..

Cheeers
-Venu

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top