How to perform restore of only 1 specific table in SQL Server 2012

0

Good afternoon!

I have a following situation: I have a database backup and the server has already created a database with this base called test, however, I need to migrate a specific table that is in this test base to another database called Produced on the same server. The table name is an add-in.

    
asked by anonymous 04.09.2017 / 21:43

1 answer

1

You can do an insert from one bank to another by creating the table in the production bank in this process.

IF NOT EXISTS(SELECT * FROM [Producao]..SysObjects WHERE Name LIKE 'complemento')                 
BEGIN
    SELECT * INTO [Producao].dbo.[complemento] FROM [teste].dbo.[complemento]
END
    
11.09.2017 / 16:48