Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread John Machin
On 30/05/2009 12:43 PM, Andrés G. Aragoneses wrote: > I just tried to create a primary key with 2 columns and got this error: > > "sqlite error" "table X has more than one primary key" > > > Doesn't SQLite support this?? :o It does support multi-column primary keys. It's a bit hard to tell at

Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread Andrés G. Aragoneses
Thanks! It worked. Sorry for the silly question :) Igor Tandetnik wrote: > ""Andrés G. Aragoneses"" > wrote in message > news:gvq7b2$lp...@ger.gmane.org >> CREATE TABLE LastSyncedRatings ( >> DapID TEXT PRIMARY KEY, >> MetadataHashTEXT PRIMARY KEY, >>

Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread Harold Wood
create table tablename (     colname1 coltype,     colname2 coltype,     colname3 coltype,     PRIMARY KEY(colname1 asc, colname2 asc) ) --- On Fri, 5/29/09, Pavel Ivanov <paiva...@gmail.com> wrote: From: Pavel Ivanov <paiva...@gmail.com> Subject: Re: [sqlit

Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread Igor Tandetnik
""Andrés G. Aragoneses"" wrote in message news:gvq7b2$lp...@ger.gmane.org > CREATE TABLE LastSyncedRatings ( > DapID TEXT PRIMARY KEY, > MetadataHashTEXT PRIMARY KEY, > Rating INTEGER NOT NULL > ) Make it CREATE TABLE LastSyncedRatings

Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread Andrés G. Aragoneses
CREATE TABLE LastSyncedRatings ( DapID TEXT PRIMARY KEY, MetadataHashTEXT PRIMARY KEY, Rating INTEGER NOT NULL ) Pavel Ivanov wrote: > What create table statement did you use? > > Pavel > > 2009/5/29 "Andrés G. Aragoneses" : >> I just

Re: [sqlite] 2 columns as primary key?

2009-05-29 Thread Pavel Ivanov
What create table statement did you use? Pavel 2009/5/29 "Andrés G. Aragoneses" : > I just tried to create a primary key with 2 columns and got this error: > > "sqlite error" "table X has more than one primary key" > > > Doesn't SQLite support this?? :o > >        Andres > > --

[sqlite] 2 columns as primary key?

2009-05-29 Thread Andrés G. Aragoneses
I just tried to create a primary key with 2 columns and got this error: "sqlite error" "table X has more than one primary key" Doesn't SQLite support this?? :o Andres -- ___ sqlite-users mailing list sqlite-users@sqlite.org