-
Is maximum size of varchar data type is 8000?
Hi All,
I am the new member of this forum. Please help me out with the following query.
I have created a log table with 6 columns of different data type and size. out of these, two columns are with size 3000 each i.e. varchar(3000). I have checked with total size of table and its not even exceeding 8000. Everything was fine and the table was created successfully with out any error. Even while inserting data into that table its not throwing any error.
But to my surprise when I see the data in a table, the column size with varchar(3000) contains only 256 character data. that means the data of full size is not getting loaded. Its truncating.
Could any one please clarify why the size of 3000 is not holding 3000 char and why it holds only 256 char?
I am using sql server 2000 sp4 version
please let me know if any one require further information.
Hoping for a quick reply
Thanks
kawrat
-
Query analyzer displays 256 characters per column by default, you can reset it in tools -> options -> results tab.
-
Thanks. Appreciate for a quick reply.
Yes, configuration was a big issue. Thanks a lot this worked out.
But now it raises another query.
Instead of changing the configuration settings (from 256 – to 3000) is there any alternate option to read the data from the table via code?
Say we have a default option set to 256 maximum column char. Now if I want to read (SELECT) a data from a table I can read only 256 chars of column size 3000. Is there any possibility to read complete data (all 3000 chars) with out changing default settings?
Thanks in Advance
-
Not in query analyzer. You got 3000 characters from the query, but query analyzer only displays first 256 characters of them by default.
-
Thanks for the information...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|