Will Leshner wrote:

I understand that they are not the same thing in SQL. What I want to know is whether or not applying UNIQUE and PRIMARY KEY amount to the same thing *in SQLite*. Because if they are functionally the same *in SQLite* (and I think, right now, that they are) then it might be interesting to request that UNIQUE columns be marked as PRIMARY KEYs in the table_info().

1. There can only be one PRIMARY KEY, but multiple UNIQUE constraints are allowed.

2. PRIMARY KEY implies NOT NULL, but UNIQUE does not.

3. A single-column PRIMARY KEY of type INTEGER has special properties.

Thoses are the differences between PRIMARY KEY and UNIQUE in SQLite.


-- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to