On Tue, Oct 05, 2010 at 09:56:52PM +0200, Pawe?? Salawa scratched on the wall: > Hi, > > My SQLite is 3.7.2. > > I have a table like this: > > CREATE TABLE [newsd] ( > [id] INTEGER PRIMARY KEY AUTOINCREMENT, > [date] INTEGER NOT NULL, [title] TEXT NOT NULL, > [yhfgdfhd] NONE, > CONSTRAINT "fg" UNIQUE ([yhfgdfhd]) ON CONFLICT IGNORE > )
> So I'm indeed unable to set duplicate on UNIQUE column, but SQLite doesn't > raise error, thus my application doesn't call ROLLBACK for that case. No error is raised because you told SQLite to ignore the error with "ON CONFLICT IGNORE." <http://sqlite.org/lang_conflict.html> IGNORE When an applicable constraint violation occurs, the IGNORE resolution algorithm skips the one row that contains the constraint violation and continues processing subsequent rows of the SQL statement as if nothing went wrong. Other rows before and after the row that contained the constraint violation are inserted or updated normally. No error is returned when the IGNORE conflict resolution algorithm is used. In specific, note the last sentence in that paragraph. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users