Igor,thank you for the explanation however, I am still not clear if the conflict resolution clause will be used on a table with no UNIQUE or PRIMARY KEY columns? I would assume not but i couldn't find the answer in the documentation.
thanks, ed On Fri, Jan 9, 2009 at 11:17 AM, Igor Tandetnik <itandet...@mvps.org> wrote: > ed <epdm...@gmail.com> wrote: > > I have a sqlite 3.3.4 app using a db with the following schema: > > > > CREATE TABLE my_data(n INTEGER KEY, s INTEGER, p INTEGER, od VARCHAR); > > > > Is the KEY keyword utilized? > > The way this statement is parsed, column 'n' has the type of 'INTEGER > KEY'. Remember, SQLite allows almost any odd sequence of identifiers as > a type name (except that it can't contain certain keywords that > introduce column-constraint clause, e.g. PRIMARY). You could just as > well write > > CREATE TABLE my_data(n I LOVE SQLITE, ...); > > (try it - it does work). > > > Will it act the same as a primary key ? > > No. > > > Ultimately, i'm trying to determine if the KEY will enforce a unique > > constraint > > No. But PRIMARY KEY or UNIQUE will. > > > such that the following insert's conflict clause would > > even be necessary. > > Conflict resolution clause is never necessary. If none is specified, the > default of ABORT is used. > -- > With best wishes, > Igor Tandetnik > > With sufficient thrust, pigs fly just fine. However, this is not > necessarily a good idea. It is hard to be sure where they are going to > land, and it could be dangerous sitting under them as they fly > overhead. -- RFC 1925 > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users