Print a text N number of times in SQL Management Studio

When working with SQL Management studio , you might need to display a string N number of times , in this case , simply use the GO command and specify the number of times you want the batch to be repeated.

How to print a text ‘N’ number of times in SQL Management Studio ?

For example , you want to display a string ‘This is Ginktage.com’ 10 times. Here’s how you will do it.

PRINT 'This is Ginktage.com'
GO 10

image

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.

Leave a Reply