Re: No hay Enum en postgresql

From: Alvaro Herrera <alvherre(at)dcc(dot)uchile(dot)cl>
To: "Mar?a Teresa Calbul T(dot)" <mcalbul(at)gmail(dot)com>
Cc: pgsql-es-ayuda(at)postgresql(dot)org
Subject: Re: No hay Enum en postgresql
Date: 2005-01-15 00:56:13
Message-ID: 20050115005613.GB15406@dcc.uchile.cl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-es-ayuda

On Fri, Jan 14, 2005 at 09:28:21PM -0300, Mar?a Teresa Calbul T. wrote:

Hola,

> ...mi problema es en la tabla alumno, donde hay q seleccionar una de
> las 2 alternativas: normal o ayudante...

Prueba con esto:

CREATE TABLE alumno(
...
ALU_TIPO VARCHAR(40) DEFAULT 'NORMAL' NOT NULL CONSTRAINT ALU_TIPO
CHECK (ALU_TIPO IN ('NORMAL','AYUDANTE')),
....
);

--
Alvaro Herrera (<alvherre[(at)]dcc(dot)uchile(dot)cl>)
"I dream about dreams about dreams", sang the nightingale
under the pale moon (Sandman)

In response to

Browse pgsql-es-ayuda by date

  From Date Subject
Next Message Manuel Sugawara 2005-01-15 00:59:08 Re: No hay Enum en postgresql
Previous Message María Teresa Calbul T. 2005-01-15 00:28:21 No hay Enum en postgresql