Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 

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)

copy/paste multiple columns

By Robin van Schaik,

Tip: Put the stored procedure under a shortcut.

Select table/view, press shortcut and all columns are listed in the output window. Copy/Paste all the columns you need at once.

Instead of this script you could also use the sp_help procedure in the same way, however this script has two advantages:

1): It also works on temp tables

2): It also lists columns with a comma in front of it, so that saves you some time typing. Idem for brackets [].

Total article views: 1457 | Views in the last 30 days: 1
 
Related Articles
FORUM

column size

column size

FORUM

Computed Column

Computed Column

FORUM

split columns

Split columns

FORUM

alter column

alter column

FORUM

add column between two column

add column between two column

 
Contribute