Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

GET MAX COLUMN SIZE

Status
Not open for further replies.

chrisdq

Programmer
Nov 6, 2002
77
US
Hi,


Does anyone know how to find out the max size of characters of a column using SQL query?

Sometimes people enter characters that exceed the max size of a column and SQL returns an error. I want to do a check first and give people a friendly error.



Thanks in advance,
Chris.
 
Run this in Query Analyzer.

Select * from Information_Schema.Columns

There should be a Character_Maximum_Length column that you can use.

-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
gmmastros,

Thanks for the your very helpful tip, however Information_Schema.Columns doesn't seem to show the max size for digits.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top