Re: primary key and uniqueness
Posted in 2000
Hi!
Serial is going to be unique for starters, primary key is always unique, so
why are you trying to repeat yourself, repeat yourself?
Michael
"Martin A. Marques" wrote:
> Is it posible to create a table like this
>
> CREATE TABLE usuario (
> U_id SERIAL PRIMARY KEY UNIQUE,
> U_nombre NCHAR(50),
> );>
> The question would be if I can combine "PRIMARY KEY" with "UNIQUE". Can I
> make any kind of combination of constraints?
>
> Thanks
>
> --
> "And I'm happy, because you make me feel good, about me." - Melvin Udall
> -----------------------------------------------------------------
> Martín Marqués email: martin@math.unl.edu.ar
> Santa Fe - Argentina http://math.unl.edu.ar/~martin/
> Administrador de sistemas en math.unl.edu.ar
> -----------------------------------------------------------------