If you're a developer who started their trade before the ORM days, you've likely had to insert data en masse into a sql server db , if for only test purposes. Usually this involves writting out INSERT INTO statements, one complete DDL command for each row. Seems rather crazy to repeat the columns you want to insert data into. There was a sort-of workaround where you could use SELECT and UNION ALL to put them together.
INSERT INTO [Region] ([Id], [Code],[Description],[SortOrder]) VALUES (1, 'LS', 'Lumbar Spine', 1)
INSERT INTO [Region] ([Id], [Code],[Description],[SortOrder]) VALUES (2, 'NH', 'Neck & Head', 2)
INSERT INTO [Region] ([Id], [Code],[Description],[SortOrder]) VALUES (3, 'KN', 'Knee', 3)
INSERT INTO [Region] ([Id], [Code],[Description],[SortOrder])
SELECT 1, 'LS', 'Lumbar Spine', 1
UNION ALL SELECT 2, 'NH', 'Neck & Head', 2
UNION ALL SELECT 3, 'KN', 'Knee', 3
Since Sql Server 2008 (!) there has been a concept called Row Constructors which allows Sql Server developers to avoid this verbose syntax.
INSERT INTO [Region] ([Id], [Code],[Description],[SortOrder])
VALUES
(1, 'LS', 'Lumbar Spine', 1),
(2, 'NH', 'Neck & Head', 2),
(3, 'KN', 'Knee', 3)
A whole bunch easier to see and saves the extra typing. If only I wasn’t 4 years late to the party…