Generate Insert Data Scripts Without Identity Column In SQL Server
I have been generating insert data scripts through SQL Server Management Studio on the fly. However if you don't want to include the ID which is an identity column,this feature is not defined in the IDE. The workaround for this is to insert the records without the ID column into a temporary table and generate insert data scripts using that temp table.
The query above will insert records from tblParts to temp table tmptblParts. The column ID is omitted. After you have executed that statement, then generate insert scripts using tmptblParts.
Select PartNum, PartDescription, Model, Category, SaleQTY, Price Into tmptblParts From tblParts
Comments
Post a Comment