On Mon, Feb 17, 2003 at 14:47:01 +0000,
Ben Clewett <B.Clewett@roadrunner.uk.com> wrote:
>
> An UNSIGNED number. Is this 'field INTEGER CHECK (field >= 0)', or is
> there a direct UNSIGNED reference I have missed?
There is no unsigned type. You can use a check constraint to enforce this.
> The AUTO_INREMENT extension to a Primary Key, as used in MuSQL. What is
> the official method for auto-incrementing fields? I have found the
> 'DEFAULT NEXTVAL('...'), but I am not sure whether/how/if this can be
> used to auto-increment a primary field?
Yes, you want to use sequences as they are a lightweight way to generate
unique keys. The Serial types provide a simple way to do this. They
create a sequence, set the default to use nextval and add a not null
constraint. They don't create a unique index, but a primary key constraint
will do that.