Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
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: 1922 | 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...


Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones