In SqlServer we can use NVarchar(MAX) but this is not possible in sqlite. What is the maximum size I can give for Nvarchar(?)?
There is no maximum in SQLite. You can insert strings of unlimited length (subject to memory and disk space.) The size in the CREATE TABLE
statement is ignored anyway.
What is the maximum size I can give for Nvarchar(?)?
You don't, because Sqlite will ignore anything over 255
when specified inside NVARCHAR(?)
.
Instead, use the TEXT
datatype wherever you need NVARCHAR(MAX)
.
For instance, if you need a very large string column to store Base64 string values for images, you can use something like the following for that column definition.
LogoBase64String TEXT NULL,
SQLite doesn't really enforce length restrictions on length of string.
Note that numeric arguments in parentheses that following the type name (ex: "VARCHAR(255)") are ignored by SQLite - SQLite does not impose any length restrictions (other than the large global SQLITE_MAX_LENGTH limit) on the length of strings, BLOBs or numeric values.
Source www.sqlite.org/datatype3
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With