volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

How many characters can LongString contain?

I have learned that ShortString (MetaDataType) can hold strings of up to 512 characters.

But what about LongString - how many characters can this data type hold?

(it doesn't seem to be documented anywhere)

#199018
Nov 13, 2018 12:26
Vote:

LongString is stored as NVARCHAR(MAX), which is 2GB maximum. Since each character is 2 bytes in length so you get ~ 1 Billion characters maximum.

But I doubt you would want or should have a property that long. But a few KB should be fine. 

#199019
Nov 13, 2018 12:39

I see :-)

I need to store a meta field of text of up to 5 KB. Is there a better data type than LongString for that purpose?

#199020
Edited, Nov 13, 2018 12:44

No, LongString is the perfect one (if not the only one) for it 

#199021
Nov 13, 2018 13:05
error This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.