Gustavo Vedotti

Rapidinhas: Backup table SQL Server

Posted in SQL by agvedotti on 10/28/2010

Quem nunca precisou fazer backup de tabelas no SQL Server? O código abaixo cria uma nova tabela (BackupTable) idêntica a  declarada no FROM (MyTable), copiando tanto design quanto os dados.

SELECT *
INTO BackupTable
FROM MyTable

Dica dada pelo @vieira_eric (Jovem) vulgo Eric Vianna.

Ta.

Advertisements
Tagged with: , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: