Let’s say I have two databases with identical tables, but one database’s tables contains data while the other doesn’t. Is there a way in SQL Server to generate a script to fill the empty tables with data from the full tables?
Let’s say I have two databases with identical tables, but one database’s tables contains
Share
If the tables are identical and don’t use an IDENTITY column, it is quite easy.
You would do something like this:
Again, only for identical table structures, otherwise you have to change the SELECT * to the correct columns and perform any conversions that are necessary.