Hello,

I have something like this:
Table Product
----------------
asin : text PK
active : integer
title : text

Table Info
--------------
id : int PK AUTOINC
price : int
date : date

Now, since each product can have 1 .. n  infos, I have yet this table:
Table ProductInfo
---------------------
asin : text PK (should be a product PK)
id : int PK (should be a info PK)

In sqlite I do:
$ sqlite3 buh
SQLite version 3.3.12
Enter ".help" for instructions
sqlite> CREATE TABLE  product (asin TEXT PRIMARY KEY NOT NULL, active
INTEGER, title TEXT);
sqlite> CREATE TABLE info (id INTEGER PRIMARY KEY AUTOINCREMENT, price
INTEGER, date DATE);
sqlite> CREATE TABLE productinfo (productasin INTEGER PRIMARY KEY,
infoid INTEGER PRIMARY KEY);
SQL error: table "productinfo" has more than one primary key

Why is this? How can I solve the problem? Moreover, active in table
product is a boolean but I'm using an int since I don't know if
there's a boolean type, is there?

Cheers,

--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to