Hi,
* Kees Nuyt [2010-12-05 22:09:08 +0100]:
> If you need a compound index for performance reasons, you can use
> the autoincrement key as the primary key for the table and define a
> unique index on the compound key. Is doesn't serve as a constraint
> though, because the primary key constraint
On Sun, 5 Dec 2010 20:53:43 +0100, Christophe Danker
wrote:
> thanks for answering. Well, without wanting to open up a general discussion
> on the merits or not of having compound primary keys with one auto-increment
> value, i had other technical constraints in mind relating to perl's
> Catalyst
Hello Igor,
* Igor Tandetnik [2010-12-05 11:53:17 -0500]:
> If you want ID to be auto-incremented, then it will always be unique on its
> own. Why then do you want a compound primary key? Just declare
>
> ID integer primary key
thanks for answering. Well, without wanting to open up a general
Christophe Danker wrote:
> sqlite> create table test("ID" INTEGER NOT NULL, "a" VARCHAR(100), "b"
> VARCHAR(100), PRIMARY KEY("ID","b"));
>
> Also: couldn't that bug be resolved for multi-column primary key situations
> if only one column is of type "INTEGER" (vs "VARCHAR" or even "INT")?
If yo
Hi all,
I did look at archives and found one way to do this:
bash:~$ sqlite3 test.db
SQLite version 3.2.8
Enter ".help" for instructions
sqlite> create table test("ID" INTEGER NOT NULL, "a" VARCHAR(100), "b"
VARCHAR(100), PRIMARY KEY("ID","b"));
sqlite> insert into test ("a","b") VALUES ('foo',
5 matches
Mail list logo