Of course if your structures are not identical, you will need to explicity define the columns in the insert statment.
Other things to consider. Do you have exisitng records? Do you want to keep them or delete them prior tot he insert?
Truncate table is good for deleting records quickly but it is not logged, so you can't recover easily from it. ALso the person running the command must have sys admin or dbo rights to the table. If you want ordinatry users to perform this task, it is best to use the delete command.
Also, you may want to update existing records, then insert any which were not inthe dataset originally. If you want to do this, let us know and we can provide sample code.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.