Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin.
Search for scripts directly from SSMS, and instantly access any saved scripts in your
SSC briefcase from the favorites tab.
Download now (direct download link)
Thank this author by sharing:
By Megan Beebe,
Paste the above script into a query window and see the results. The first time I saw this, I expected to see only the last row's data in the variables.
The best use I've found for this behavior is select the values out of syscolumns into a single string that I can easily paste into a select statement.