How do you copy tables for archiving?

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

jlee

Thread Starter
Joined
Jul 20, 2004
Messages
14
Hi

I have a table in a database within phpmyadmin and have a delete sql statement that works fine. However, as well as deleting the entry from table1 I want to copy it to table2 which is basically used as an archive. So the main table has current information and the older records are kept in table2 - is there any way to do this?

Thanks
 
Joined
Jul 29, 2001
Messages
21,334
Make a table that you can archive to that has the same structure as the data you are deleting. Make the query that updates the new table based on the query and when that is done have it delete the entries from the main table.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top