SQL to copy a table from one Database to Another

You might need to copy tables from one database to another. I do this often if I want to test complicated scripts that update tables. You might have data in one table that you need to use to compare to another table and run updates accordingly. A quick way to test this is to copy the tables to a Development Database and then just run the scripts against the tables in there. Let’s consider we have DB1 with Table1 and Table2 We want to copy Table1 and Table2 to a Database called DevDB1 (assuming default dbo schema) Use the following Continue Reading

Posted In SQL