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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I would like to know the code to co

Status
Not open for further replies.

paulbradley

Programmer
Oct 9, 2002
158
GB
I would like to know the code to copy data from one table, out it in another and delete what was in the original table.

The field names are the same in both tables.

Many thanks.
 
use two separate queries with the following SQL code:

insert into table2 select * from table1

to copy the data across, and

delete from table1

to clear the first table.

Just replace "table1" with the source table name and "table2" with the name of the destination table.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top