![]() ![]() You can’t insert a value less than 10 in the “Quantity” column. Quantity INTEGER NOT NULL CHECK(Quantity > 10) SQLite check constraint a condition to check an inserted value, if the value doesn’t match the condition, it won’t be inserted. ![]() Note that, this applies on the values of the column “EmployeeId” only. This will enforce the “EmployeeId” value to be unique, no duplicated values will be allowed. SQLite Unique constraint it will prevent duplicate values among all the values of the column.įor example: EmployeeId INTEGER NOT NULL UNIQUE If you write an insert statement, and you didn’t specify any value for that column, the column will have the value 0. SQLite Default constraint if you don’t insert any value in a column, the default value will be inserted instead.įor Example: ColumnName INTEGER DEFAULT 0 ![]() SQLite Not null constraint prevents a column from having a null value:ĬolumnName INTEGER NOT NULL DEFAULT Constraint
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |