Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-31 Thread Bertrand Mansion
<[EMAIL PROTECTED]> wrote : > Will Leshner wrote: >> >> On Dec 31, 2003, at 4:56 AM, D. Richard Hipp wrote: >> >>> 1. There can only be one PRIMARY KEY, but multiple UNIQUE constraints >>> are allowed. >>> >>> >> >> Ah. This one I didn't know. I thought that multiple columns could >>

Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-31 Thread D. Richard Hipp
Will Leshner wrote: On Dec 31, 2003, at 4:56 AM, D. Richard Hipp wrote: 1. There can only be one PRIMARY KEY, but multiple UNIQUE constraints are allowed. Ah. This one I didn't know. I thought that multiple columns could participate in the PRIMARY KEY. But I just tested it and sure enough

Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-31 Thread Will Leshner
On Dec 31, 2003, at 4:56 AM, D. Richard Hipp wrote: 1. There can only be one PRIMARY KEY, but multiple UNIQUE constraints are allowed. Ah. This one I didn't know. I thought that multiple columns could participate in the PRIMARY KEY. But I just tested it and sure enough I get an error when

Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-31 Thread D. Richard Hipp
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

Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-30 Thread Will Leshner
On Dec 30, 2003, at 3:12 PM, Kurt Welgehausen wrote: ... are UNIQUE columns basically the same as PRIMARY KEY ...? No, they're not the same thing. 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

Re: [sqlite] UNIQUE vs PRIMARY KEY

2003-12-30 Thread Kurt Welgehausen
>> ... are UNIQUE columns basically the same as PRIMARY KEY ...? No, they're not the same thing. There are dozens of elementary articles on database theory on the www. Try a Google search on 'database primary key' or something like that.