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

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, let’s learn about the error message “1459 – An error occurred while accessing the database mirroring...
In this blog post, let’s learn about the error message “7937 – Columnstore index has one or more missing column...