0

I need to take all rows from table1 and copy it to table2 at midnight each day. Just like a backup.

What could a possible way out?

I am using MySQL and Xampp server with PHP

1
  • You have to set cronjob Commented Sep 16, 2017 at 7:19

2 Answers 2

1

You could use a cronjob if you're using linux or the scheduler if you're using windows.

Sign up to request clarification or add additional context in comments.

Comments

1
  1. Expand the SQL Server Agent node and right click the Jobs node in SQL
  2. Server Agent and select 'New Job' In the 'New Job' window enter the name of the job and a description on the 'General' tab.
  3. Select 'Steps' on the left hand side of the window and click 'New' at the bottom.
  4. In the 'Steps' window enter a step name and select the database you want the query to run against. Paste in the T-SQL command you want to run into the Command window and click 'OK'.
  5. Click on the 'Schedule' menu on the left of the New Job window and enter the schedule information (e.g. daily and a time). Click 'OK' - and that should be it.

Let me know if it helps

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.