Unique is implemented (as it must be) via a unique index. CREATE TABLE ItemTable ( "key" text UNIQUE, value blob NOT NULL );
is equivalent to CREATE TABLE ItemTable ( "key" text, value blob NOT NULL ); CREATE UNIQUE INDEX sqlite_autoindex_ItemTable_1 on ItemTable (key); You should be able to rebuild the corrupted index with: REINDEX ItemTable; >-----Original Message----- >From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users- >boun...@sqlite.org] On Behalf Of Jerry Krinock >Sent: Monday, 23 June, 2014 23:33 >To: SQLite SQLite Users >Subject: Re: [sqlite] Adding WHERE to query --> database disk image is >malformed > >Oh, I just realized that, although Igor's suggestion "fixed" the problem, >this database definitely does not contain any indexes. The schema dump >is simply this... > >CREATE TABLE ItemTable ( > "key" text UNIQUE, > value blob NOT NULL >); > > >_______________________________________________ >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