On 14 Sep 2011, at 12:38pm, Eugene Viter wrote: > I think that named table constraints is great feature of DBMS engine. It > helps users of DB to centralize business logic as close to the data as > possible. > Do you plan to include this feature in the SQLite engine in future? > > Example: > > create table LOG ( > ID integer primary key, > TIME integer not null, > TYPE integer not null, > MSG text, > > constraint LOG_TIME_C check (TIME > 0), > constraint LOG_TYPE_C check (TYPE between 1 and 3) -- 1 = Info, 2 = Warn, 3 > = Error > );
SQLite supports both column and table constraints: http://www.sqlite.org/lang_createtable.html Your exact text may not work to generate exactly the error you expect, but you should find something similar. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users