Search code examples
sqlitenullabort

How to set the ABORT option in SQLite from Tcl when violating NOT NULL constraint


I have a TCL script where i generate a SQLite table:

DB eval {CREATE TABLE StressDat2( LC int NOT NULL, EID int NOT NULL, Xtens float, Ytens float ) } 

When I try to write NULL values they get accepted anyhow. How can I from Tcl, when generating my table, set the ABORT option which shall handle writing attempts of NULL values?


Solution

  • The Xtens and Ytens columns do not have a NOT NULL constraint. (The default conflict resolution algorithm is ABORT; you don't need to set it.)