Igor Tandetnik <itandet...@...> writes:

[...]
 
> CREATE UNIQUE INDEX, perhaps?


I already thought about it but where's the difference between

solution 1
----------
CREATE TABLE example(
a     INTEGER PRIMARY KEY AUTOINCREMENT
b     TEXT    NOT NULL,
c     INTEGER NOT NULL UNIQUE
-- or UNIQUE(c)
);

AND

solution 2
----------
CREATE TABLE example(
a     INTEGER PRIMARY KEY AUTOINCREMENT
b     TEXT     NOT NULL,
c     INTEGER  NOT NULL
);
CREATE UNIQUE INDEX example_c ON example(c);

I think solution 1 only leeds to an implicit Index (like PK) while solution 2 is
the explicit way.

greetings
Oliver

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

Reply via email to