Re: primary key and uniqueness
Posted in 2000
Obnoxio The Clown — — source: Informix-list mailing list archive (1991-1998)
From: "Martin A. Marques" <martin@math.unl.edu.ar>
>
>Is it posible to create a table like this
>
>CREATE TABLE usuario (
> U_id SERIAL PRIMARY KEY UNIQUE,
> U_nombre NCHAR(50),
>);
I don't know. Is it? Have you tried it? What happened?
>The question would be if I can combine "PRIMARY KEY" with "UNIQUE". Can I
>make any kind of combination of constraints?
In this case PRIMARY KEY includes UNIQUE, so why would you want to? In fact,
this produces error 577 "this type of constraint already exists on this
column set". So, technically, the answer to your question is no.
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com