Reputation: 879
I am starting out in using the sqlite3. I tried creating a record with field size limits. However those limits are not obeyed and I am able to put in data much above that limit. E.g.
CREATE TABLE PERSON
(
PERSON_ID NUMBER (4),
LAST_NAME VARCHAR2 (40),
FIRST_NAME VARCHAR2 (100),
SEX NUMBER (2)
);
In this case I would like to restrict integer length to just dddd, something like 2006 Also For 'SEX' field I am able to put something like MR which is not integer at all. I am using the Firefox addon to work with the database.
Is this kind of limits supported in sqlite3. Do I need to set some PRAGMA or anything.
Thanks.
Upvotes: 1
Views: 3347
Reputation: 206929
No, sqlite doesn't enforce those limits. See the sqlite FAQ, item 3.
Upvotes: 3