Behold the turtle

jb's Blog

"behold the turtle, he only makes progress when he sticks his neck out"
SQL2008 for Developers: INSERT INTO enhancement 13 Sep 2007 18:42

Sometimes it’s the smallest enhancements… INSERT INTO has gotten a small makeover in SQL Server 2008 which now allows you to specify multiple rows as part of a single statement. While the sky has yet to fall in reaction to this, it’s a great little enhancement for people generating data insert scripts so that the data can be inserted as a single statement (rather than having to batch it all together), and I was surprised how many people commented to me after my TechEd session about how they loved this change :)

To make use of it, simple append addition rows in a comma delimited format, surrounding each row set in brackets.

e.g.

insert into Product values

(1, 'XBOX 360', 100),

(2, 'Black Zune', 100),

(3, 'Windows Server 2008', 100),

(4, 'SQL Server 2008', 100),

(5, 'Visual Studio 2008 Professional Edition', 100)


ras - @ 13 Sep 2007 11:43
Hi JB, where can I get the slide or code for your Tech-Ed's Enterprise Patterns and Testability track.
Duncan Smith - @ 14 Sep 2007 02:08
It is possible to do this on previous versions of SQL by altering the syntax slightly to: INSERT INTO Product SELECT 1, 'XBOX 360', 100 UNION ALL SELECT 2, 'Black Zune', 100 UNION ALL SELECT 3, 'Windows Server 2008', 100 UNION ALL SELECT 4, 'SQL Server 2008', 100 UNION ALL SELECT 5, 'Visual Studio 2008 Professional Edition', 100 Slightly more to type but it works.
ras - @ 16 Sep 2007 11:15
Thanks for the slides and samples
Uxpgamhu - @ 13 Oct 2007 07:54

Jztnvnnj - @ 21 Oct 2007 01:43

Njvyizrcx - @ 21 Oct 2007 01:59

Citizfdx - @ 21 Oct 2007 02:16

Fcrkqvdzar - @ 21 Oct 2007 02:32

Qfgwufqfkj - @ 21 Oct 2007 02:47

Axjcnannui - @ 21 Oct 2007 03:03

Qdmobvc - @ 21 Oct 2007 03:17

Pwjyaindo - @ 21 Oct 2007 03:33

Unkcdence - @ 21 Oct 2007 03:48

Fhildydmx - @ 21 Oct 2007 04:04

Wawlbaprno - @ 21 Oct 2007 04:19

Gzwpiwbyji - @ 21 Oct 2007 04:36

Iqugwu - @ 21 Oct 2007 04:51

Euegdxfdw - @ 21 Oct 2007 05:07

Dhbvmwtyi - @ 21 Oct 2007 05:22

Cijuwxasc - @ 21 Oct 2007 05:37

Pbugjhasmr - @ 21 Oct 2007 05:53

Wkekzaqf - @ 21 Oct 2007 06:08

Babjbkah - @ 21 Oct 2007 06:24

Kmvxerz - @ 21 Oct 2007 06:39

Ubomdv - @ 21 Oct 2007 06:55

Tqbdev - @ 21 Oct 2007 07:10

Dqsqfmgxio - @ 21 Oct 2007 07:25

Wbratodlhs - @ 21 Oct 2007 07:41

Euvbmbbctz - @ 21 Oct 2007 07:57

Reonmt - @ 21 Oct 2007 08:17

Jsfflt - @ 21 Oct 2007 08:33

Wrhtarrm - @ 21 Oct 2007 08:48

Fotsxriz - @ 21 Oct 2007 09:04

Philippos - @ 14 Nov 2007 03:29
Nice
Dmitris - @ 14 Nov 2007 06:35
Nice
Evripides - @ 14 Nov 2007 07:46
Cool.
Vasileios - @ 15 Nov 2007 07:52
Nice...
Andreou - @ 19 Nov 2007 03:26
interesting
Ivan - @ 19 Nov 2007 11:56
Nice
Thrasyvoulos - @ 19 Nov 2007 02:27
Sorry :(
Marko - @ 19 Nov 2007 03:06
Nice...
Spiridon - @ 20 Nov 2007 06:03
Nice
Ivan - @ 20 Nov 2007 11:18
Nice
Ivan - @ 21 Nov 2007 10:11
Nice
Ivan - @ 22 Nov 2007 02:57
Nice
Ivan - @ 23 Nov 2007 03:43
Nice
Ivan - @ 24 Nov 2007 10:14
Nice
Athanassios - @ 27 Nov 2007 10:12
Cool...
Ivan - @ 28 Nov 2007 12:04
Nice
Ivan - @ 29 Nov 2007 09:18
Nice
Ivan - @ 29 Nov 2007 01:32
Nice
Ivan - @ 29 Nov 2007 03:05
Nice
Dionysios - @ 01 Dec 2007 09:24
Sorry :(
Ivan - @ 10 Dec 2007 12:40
Nice
Ivan - @ 15 Dec 2007 05:17
Nice
Idetrorce - @ 16 Dec 2007 01:21
very interesting, but I don't agree with you Idetrorce
Theodoros - @ 17 Jan 2008 03:11
Cool...

Add a new comment:

Name:

Website:

Comment:

history


2006 (47)
2007 (79)
January 2008 (5)
February 2008 (17)
March 2008 (7)
April 2008 (4)
May 2008 (1)
June 2008 (6)
August 2008 (1)
September 2008 (1)

blogs i read


John-Daniel Trask
Andrew Peters
Ivan Towlson
Josh Robb
Chris Auld
Ivan Porto Carrero
Darryl Burling
Nigel Parker

links


Mindscape
Intergen
Microsoft Regional Director Microsoft MVP - SQL Server

RSS Feed rss feed