Hi Sam,

> I am trying to create a table with two indexes:
>
> CREATE TABLE favorites (
>   cust_id CHAR(32) NOT NULL,
>   fldoid CHAR(38) NOT NULL,
>   imgoid CHAR(64) NOT NULL,
>   PRIMARY KEY (cust_id),
>   INDEX (fldoid, imgoid));
>
> SQLite keeps complaining saying there is an error around INDEX.   
> What might I be doing wrong?

Create the index separately, eg:

create index "favorites fldoid imgoid" (fldoid, imgoid);

Note that this won't create "two indexes". It creates an index sorted  
by fldoid and subsorted by imgoid, which is what you want if you'll be  
searching by fldoid and imgoid combinations.

If you instead want two individual indexes, for searching on just one  
column at a time, then you need to create two, as:

create index "favorites fldoid" (fldoid);
create index "favorites imgoid" (imgoid);

Tom
BareFeet

--
Naked ADSL2 now in Australia, at the best pricing:
http://www.tandb.com.au/broadband/?ml

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

Reply via email to