Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

SQL Server - Column Length

Participant ,
Sep 04, 2007 Sep 04, 2007
Hi,

When creating a table, and specifying the length of the datatype. Is this determined by the number of charactors or size in bytes?

Is there anyway to configure it to determine the size by bytes?

Thanks
TOPICS
Database access
428
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 04, 2007 Sep 04, 2007
For string data, it's bytes. For the various numeric types, the length is defined by the numeric type (tinyint, int, float, etc.)
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Sep 04, 2007 Sep 04, 2007
Thanks for your reply.

I dont quite understand that, could you please explain a bit more?

So If I used the ntext datatype it would store the data by memory taken up? Other wise it stores the data using charator length?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Mentor ,
Sep 04, 2007 Sep 04, 2007
LATEST
From BOL....

ntext

Variable-length Unicode data with a maximum length of 230 - 1 (1,073,741,823) characters. Storage size, in bytes, is two times the number of characters entered.


Phil
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources