Print a text N number of times in SQL Management Studio

Your 2020 Plan. Learn 20 minutes a day for 20 days. Online courses from €9.99.

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 *