Re: How are text fields stored.. ?

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Michael C# (xyz_at_yomomma.com)
Date: 03/01/05


Date: Tue, 1 Mar 2005 13:41:00 -0500


"Mike rucker" <ruckerm@emaseniorcare.org> wrote in message
news:300301c51e8c$745b1c70$a601280a@phx.gbl...
> Greetings..
>
> Please help prove I'm right about something. Text fields
> in SQL 2000 ~ do text and vchar fields truncate all
> whitespace, if the data does not fill up the declared
> field length?
>
> E.G.:
>
> vchar Fullname (255)
>
> Put some data into it:
>
> Dr. Jones Warnabe
>
> Will the field in memory be 255 characters or about 17
> characters?

Per BOL, for varchar [(n)], storage size is the actual length in bytes of
the data entered, not "n" bytes.

>
> Also ~ where would such information BE?

SQL Books Online > Index > varchar data type / text data type

>
> Thank you in advance!
>
>



Relevant Pages

  • Re: Padding zeros when converting numeric to char
    ... >whitespace I was dealing with. ... Hi Jeff, ... varchar doesn't take up more space. ...
    (microsoft.public.sqlserver.programming)
  • SQL server
    ... (including whitespace) ... into a table cell that is set at ... VARCHAR 8000. ... this is regular .txt content and not ...
    (microsoft.public.sqlserver.security)