SQL Clone
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)

List columns data type and size for every table in a database

By Bryian Tan,

A couple days ago, my co-worker had asked if I could provide a list of all the columns in certain tables in some of our databases to share with a vendor. This vendor needed to know the column names, data type and max length, of each of the columns in the database. If you happen to come across this kind of situation, here is a stored procedure that will help you list the data type and size of all the columns of the selected or all the tables in a SQL Server 2005/2008 Database.


Here is the link to download the function UTILfn_Split


Total article views: 1953 | Views in the last 30 days: 3
Related Articles

Database Collation VS Column Collation

Database one overwrites the column's


Database Column Encyption

I want Encypt the database column


Finding Column,Table in Database for Data

Finding Column,Table in Database for Data


Database Owner column is empty?

Database Owner column is empty but under General database properties The Owner of the database is NT...


Show all database's tables' columns' collations.

Created view displays all text columns' collations in the current database with the information whet...