I have a question regarding generating SQL script from a database.If you use SQL Server Management Express, it lets you generate SQLscript that can be used to recreate table structure, stored procedures,etc. But it does not include the actual data stored in the tables.
Is it possible to generate SQL to *INSERT* data as well? If yes, then how?
You can get a template query for inserting data to 1 table by right clicking the table in Object Explorer->choose Script Table As->INSERT To. However there is no such generated script to do actual INSERTs and it is not necessary, because there are serveral easy way to transfer data into the new table, for example you can just use such INSERT command:
INSERT INTO newTable SELECT * FROM oldTable
|||Here is software that does exactly what you want:http://www.denovations.com/products/sqlpopulator/
I'm using it by myself while creating database installation script and should say this solution matched all my requirements.
No comments:
Post a Comment