Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Backup and restore one table
Message
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 6.5 and older
Application:
Web
Miscellaneous
Thread ID:
01583196
Message ID:
01583202
Views:
38
Thank you for the explanation. Ideally I would like to "restore" the table with all indexes, triggers, etc. The way I understand it, is that I would then (after doing a test run) truncate the "good" table and Select from the "backup" table into this "good" table. Can I assume that when I truncate the table, the triggers and indexes will not be affected and therefore Selecting into will Restore?

>- In the same db as old_table
>- the same structure as old table
>
>Did you need backup only data or data and table structure with indexes, triggers, FKs?
>
>
>IF NOT OBJECT_ID('new_table') DROP TABLE new_table
>SELECT *
>  INTO new_table
>  FROM old_table
>
>
>MartinaJ
>
>
>>First, thank you. Where does the 'new_table' gets saved? And what format would it be?
>>
>>>
>>>SELECT *
>>>  INTO new_table
>>>  FROM old_table
>>>
>>>
>>>MartinaJ
>>>
>>>>I need to do some testing of changing records in one table. I anticipate many trial and and error runs. So I would like to backup the table before each test and then restore. What is the easiest way to backup just one table and restore it?
>>>>TIA.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform