Restore that backup as a different database and copy which ever row you deleted from the new database to the existing database
And delete the newly restore database
ex.
restore database newdatabase from disk = 'd:\x.bak'
with replace,
move 'x_data' to 'd:\mssql\data\x_data.mdf',
move 'x_log' to 'd:\mssql\data\x_log.ldf',
use newdatabase
go
insert into existing_database.dbo.table1 select * from newdatabase.dbo.table1 where id = xxx
restore school-class school-class from disk = 'E:\sql\backup\school-class_db_200307260600.BAK'
with replace,
move 'school-class_db_200307260600_data' to 'd:\sql\data\school-class_db_200307260600_data.mdf',
move 'school-class_db_200307260600_log' to 'd:\sql\data\event-pass_db_200307260600_log.ldf',
use school-class-bak
go
insert into school-class.dbo.customer_order select * from school-class-bak.dbo.class_id where id = 007
-----here is the err msg
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '-'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '-'.
Server: Msg 170, Level 15, State 1, Line 1
Line 1: Incorrect syntax near '-'.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.