Black, Michael (IS) wrote: > Hmmm...when I get rid of the "+'" > CREATE TABLE T1 (N INTEGER CHECK(N >= 0)); > the constraint works > > Seems to me that "+N" is the same as "abs(N)". I'm not even sure of what the > intent of "+N" would be???
A unary plus in SQLite is a no-op, but it suppresses type coercion, and also may inhibit the use of an index (sometimes SQLite optimizer picks a suboptimal index for the query, and suppressing that index allows the optimizer to pick a different one). ColumnName is an expression with the affinity associated with the column; +ColumnName is an expression with the same value but no affinity. The difference is important in some cases. -- Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users