Skip to Content (Press Enter)
OutSystems.com
Personal Edition
Community
Support
Training
Training
Online Training
Developer Schools
Boot Camps
Certifications
Tech Talks
Documentation
Documentation
Overview
ODC
O11
Forums
Forge
Get Involved
Get Involved
Jobs
Ideas
Members
Mentorship
User Groups
Platform
Platform
ODC
O11
Search in OutSystems
Log in
Get Started
Back to Forums
nick rowan
264
Views
4
Comments
Varchar(max) vs Text in MS SQL
Discussion
Announcement
Hi,
Are there any plans to start using Varchar(max) for sql data types rather than text. According to the Outsystems documentation it looks like if a string goes over 2k characters it gets put in a Text datatype.
In MS SQL you can have a Varchar up to 8k characters and nVarchar up to 4k characters. Varchar(max) also attempts to fit as much or the the characters into the row up to the 8k limit before creating a BLOB.
Also, the Text data type has been depreciated since Sql 2005.
Edit: Just thinking about it, if you're restricting it to 2k to cater for Oracle's Varchar datatype it seems a bit wrong to restrict all other databases to use the lowest common denominator. Oracles varchar2 can have up to 4k characters and nVarchar2 can have 4k bytes or up to 4k characters. As far as I remember MySQL's varchar limit is restricted by the 65k byte row limit and the character limit will depend on the character set.
João Rosado
Staff
Hi Nick,
I'm pretty sure that it is a documentation issue, I'll confirm it and ask for an update.
In MSSql it creates a nvarchar(max) since a couple major versions back. Old tables are not automatically upgraded to the new type.
Regards,
João Rosado
nick rowan
Great thanks João.
João Rosado
Staff
Hi again,
Just checked it:
:)
Regards,
João Rosado
nick rowan
Ah excellent thank you!
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
See the full guidelines
Loading...