On Mon, Apr 21, 2014 at 6:18 AM, Neville Dastur <nevillebdas...@gmail.com>wrote:

> I seem to have a strange problem.
>
> I am using the INSERT OR REPLACE INTO syntax on a Sqlite DB running in iOS
> simulator 7.1 (not exactly sure which sqlite version that is)
>
> I have a column defined as hospitals_id TEXT PRIMARY KEY UNIQUE which
> stores a GUID. Hence the text primary key. When I do an INSERT OR REPLACE
> the rows are duplicated.
>

Can you send a test case? Are you certain that the GUIDs really are
identical?



>
> Google only showed up that UNIQUE needs to be added regardless of the
> column being a PRIMARY KEY.


Google is wrong.  The UNIQUE is superfluous.  PRIMARY KEY always implies
UNIQUE.  Always.

-- 
D. Richard Hipp
d...@sqlite.org
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to