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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Maximum length of varchar in sybase 12.5

Status
Not open for further replies.

jimmy8888

Programmer
Mar 30, 2007
1
CA
Hi, all:

I think the maximum length of varchar in sybase is 255.
But I create a column with varchar type and the length is 8000, and sybase still allows it, and actually I can store and retrieve the string with less than 8000 characters. I don't know why. Can somebody expain it to me. thank you very much!

By the way, if I have a column with 8000 chars, I think it is better to store it as text type, isn't it?
 
The maximum length of a Varchar depends on the version of Sybase you are using. 11.9 and below was 255.

Version 12.5 and onwards has maxium length of about 32KB - much bigger :-}

Whether it's "better" to store as a text type depends on what you want to do with it. Sybase increased the maximum of varchar due to demand from DBAs and developers, because the varchar type is better for indexing etc. Generally, varchar is better for joins.

check out our Sybase resources at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top