At 11:37 PM +0100 5/12/07, Paulo J. Matos wrote:
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?

SQLite has just these types: Int, Real, Text, Blob, Null.

SQLite does not have a boolean data type, though I think it really should; the boolean type is fundamental to the relational model of data. For example, what is the data type of the expression in a WHERE clause if not a boolean?

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?

If what you intended here was to have a single primary key which comprises both the asin and id columns (most likely), such that only the combination of the 2 must be unique, then you have to specify it using different syntax, such as this:

  CREATE TABLE productinfo (
    productasin INTEGER,
    infoid INTEGER,
    PRIMARY KEY (productasin, infoid)
  )

If you intended that each column is individually unique (unlikely), then each one is simply a "key", which in SQLite syntax involves saying one or both are "UNIQUE" rather than "PRIMARY KEY". By definition, there can only be one "primary".

-- Darren Duncan

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

Reply via email to