0

I have one SQL Server database table. I need to take backup of my table daily based on the date. For that I need to write a script. But I'm new to SQL Server can any one please help me.

Thanks in advance

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Stefan Edwards
  • 87
  • 1
  • 5
  • 13
  • 1
    Refer this URL http://stackoverflow.com/questions/487675/how-can-i-schedule-a-daily-backup-with-sql-server-express – Manish Prajapati Sep 28 '12 at 05:43
  • That's fine. In my requirement i need to take backup of data based on the date.for example In my table i have last one month details. i need to taken backup of first 15 days backup and also i need to delete the 15days details in my database – Stefan Edwards Sep 28 '12 at 05:53
  • This everything should perform in automatically – Stefan Edwards Sep 28 '12 at 05:53

1 Answers1

2

You could copy it with command

select * into new_table1 from primarytable

This will create a table named new_table1 with data from primarytable.

You must of course backup the whole database.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459