Hello
I want to create sql script for my database. I know about “Generate SQL Server Scripts Wizard” but it just give me script for structure of my database and I want all records of my tables too.
And I’ve tried “Script table as / Insert to“via right click on my table too and it doesn’t give me a script to insert all records!
How can I create script to insert all records of a table to another table with same column properties?does exist any things to do it for me?
Thanks in advance.
Best to just create a database backup and create a TSQL script to restore it.
Or, you need to bulk copy the data out into a file and use bcp.exe or bulk insert to re-populate the table.
|||Hi,
In order to generate insert statments for a table, you can use a very well written script that can be found at http://vyaskn.tripod.com/code.htm#inserts
Here you will find both the versions of the script (for SQL2000 and SQL2005) and its very easy to use.
Regards,
Neeraj
No comments:
Post a Comment