Ward Pond's SQL Server blog

Ruminating on issues pertinent to the design and development of sound databases and processes under Microsoft SQL Server 2008, SQL Server 2005, and SQL Server 2000 (while reserving the right to vent about anything else that's on my mind)

There's More To GO Than Meets The Eye

There's More To GO Than Meets The Eye

  • Comments 2
  • Likes

This little tidbit originated with Kalen Delaney, and was forwarded to me by Lance Larsen, a colleague here at Microsoft.  I've verified that this works in all versions of SQL Server since SQL Server 2000 SP4.

Here's Lance's note:

I did not know about this feature until yesterday…could make inserting test data easier.


PRINT 'hello world'

go 5




Beginning execution loop

hello world

hello world

hello world

hello world

hello world

Batch execution completed 5 times.

Pretty slick, eh?

I hope this tip comes in handy; thanks to Lance for passing it along (and to Kalen for finding it!).


  • My initial thought was what a brilliant but useless tidbit.  But then again when I started really  thinking about how useful this might be - for soak testing for example.

  • Exactly, Greg..  most of these techniques can strike one as highly esoteric, until one needs them. :-)

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment