I am creating a table in Sqlite with a column with max length:
create table [Log] (
Id int identity not null
constraint PK_Log_Id primary key,
Data nvarchar (max) null
)
But the following line is not being accepted:
Data nvarchar (max) null
Why?
max
is specific to SQL Server (and I think Sybase). Just use text
:
data text not null
or, you can really use any character string data type. SQLite doesn't enforce length restrictions:
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.
(see here).
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