On Fri, Sep 17, 2010 at 02:02:44PM -0400, Igor Tandetnik wrote: > Keith Roberts <ke...@karsites.net> wrote: > > I think what I really mean is I want a text column with only > > one unique value, that is also indexed. > > UNIQUE constraint will do just that. > > > Also ,I guess the INTEGER PRIMARY KEY column is worth > > keeping in the table, as a matter of course? > > Usually, yes.
SQLite3 always has an integer primary key, either explicit or implied. So if you have a primary key column that is not an integer primary key, then effectively what you get is the same as having one column as integer primary key and another column with a unique constraint. It doesn't have to be so though. A SQL RDMBS could easily have tables which are hash-based instead of b-tree-based, in which case a table with a primary key column that is not an integer primary key could well not have an implied integer primary key. But that's not what SQLite3 does at this time. In any case, it's almost always useful to have an integer primary key. Nico -- _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users