In Management Studio, you can put a number after a GO end-of-batch marker to cause the batch to be repeated that number of times:
PRINT 'X'
GO 10
Will print ‘X’ 10 times. This can save you from tedious copy/pasting when doing repetitive stuff.
More Related Contents:
- SQL Server – error when creating stored procedure
- How can foreign key constraints be temporarily disabled using T-SQL?
- Insert multiple rows WITHOUT repeating the “INSERT INTO …” part of the statement?
- How can I escape square brackets in a LIKE clause?
- Does T-SQL have an aggregate function to concatenate strings? [duplicate]
- Parameter Sniffing (or Spoofing) in SQL Server
- SQL Server String or binary data would be truncated
- Datatype for storing ip address in SQL Server
- SQL Server Regular expressions in T-SQL
- Is there a way to loop through a table variable in TSQL without using a cursor?
- Maximum size of a varchar(max) variable
- best way to convert and validate a date string
- Concatenating Column Values into a Comma-Separated List
- SQL Server 2008 Empty String vs. Space
- How to set a default value for an existing column
- Need a datetime column in SQL Server that automatically updates when the record is modified
- How do I find a stored procedure containing ?
- WHERE clause on SQL Server “Text” data type
- Return all possible combinations of values on columns in SQL
- SQL Server error on update command – “A severe error occurred on the current command”
- SQL server schema and default schema
- SQL to find first non-numeric character in a string
- Get ROWS as COLUMNS (SQL Server dynamic PIVOT query)
- SQL Server 2008 – How do i return a User-Defined Table Type from a Table-Valued Function?
- Check if a string contains a substring in SQL Server 2005, using a stored procedure
- Cannot bulk load. Operating system error code 5 (Access is denied.)
- comparing a column to a list of values in t-sql
- Does query plan optimizer works well with joined/filtered table-valued functions?
- What are row, page and table locks? And when they are acquired?
- time format in SQL Server