On Sat, 29 Jan 2005 12:07:31 +0100, Serge Ratke <[EMAIL PROTECTED]> wrote:
> Hi List.
> 
> What i need is a Table which is quite simple
> 
> CRATE TABLE entry (
>       id INTEGER,
>       parent_id INTEGER,
>       name TEXT,
>       PRIMARY KEY(parent_id, name)
> );
> 
> Now the problem is, i want the id get incremented by every INSERT. I tried
> some things like AUTOINCREMENT (which has no effect at all, since id is
> not a primary key) and UNIQUE.

Couldn't you make 'id' the primary key and then create a UNIQUE index
for parent_id,name? I think, basically, PRIMARY KEY(parent_id, name)
is just creating such an index anyway.

Reply via email to