When I was watching Merge slide show. I have observed You can insert records with the following statement INSERT INTO Production.UnitMeasure VALUES ((N'F2', N'Square Feet', GETDATE()),(N'Y2', N'Square Yards', GETDATE())); Any internal details which one performs better writign multiple inserts OR writing insert statement like above? another FUNNY stuff fter installing Katmai BOL Crogram FilesMicrosoft SQL Server100License TermsLicense_BOL_en.txt If you open this file it shows MICROSOFT SQL SERVER 2005 BOOKS ONLINE
Have you checked the execution plan for those 2 statements? It also depends upon the volume of the data including the indexes.
Satya, I do not have 2008 on my machine. I can't test it. IF you guys find something intersting please let me know.
Looks like you can have a series of VALUES clauses, separated with a comma. Not really new functionality - we can use SELECT with a values list, and we can use UNION: INSERT INTO Production.UnitMeasure SELECT N'F2', N'Square Feet', GETDATE() UNION SELECT N'Y2', N'Square Yards', GETDATE()
I shouldn't think there would be much difference between the 2 different ways of constructing the insert statement.
Agree - just pointing out that it's probably a new variation on existing syntax in Katmai, which can already be implemented with other existing syntax in current SQL versions.
What I have suggested is performance and single insert statement (reduction in network traffic). I was also looking for such a notes within BOL, not sure it will be mentioned in SQL2008 BOL.