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)

Column_Gitter

By RickInMesa,

This little utility comes in handy if you do a lot of SQL coding. Given a table name, it'll return four results: The names of the columns, the names with their datatypes, the list of columns with each one set to an identically-named variable, and a list of variables with the same names as the columns.

If you run it as a script, just type in the name of the table on the second line. I prefer to make this a stored procedure, and pass the table name as a parameter. If you do this, then you can open a Query Analyzer window, type

Column_Gitter 'myTableName'

and hit F5, in less time than it takes to browse the table properties.

No more column-name typing! I hope this helps you.

Rick

Total article views: 194 | 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

Tags
miscellaneous    
t-sql    
 
Contribute