From: | Josué Maldonado <josue(at)lamundial(dot)hn> |
---|---|
To: | j0rd1 adame <jordi(at)jordi(dot)net> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Serials in where clause |
Date: | 2004-07-05 18:58:59 |
Message-ID: | 40E9A4F3.4000707@lamundial.hn |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Try this:
select * from jordi where "jordi_idPK" = 1
El 05/07/2004 12:31 PM, j0rd1 adame en su mensaje escribio:
> Im having trouble whith a Serial Primary key that i cannot use in a where
> clause
>
> here is what i did
>
> ixmati=# create table jordi(
> ixmati(# "jordi_idPK" serial NOT NULL,
> ixmati(# jordi_nombre varchar);
> NOTICE: CREATE TABLE creará una secuencia implícita "jordi_jordi_idPK_seq"
> para la columna "serial" "jordi.jordi_idPK"
> CREATE TABLE
> ixmati=# alter table only jordi
> ixmati-# add constraint "jordi_idPK" primary key ( "jordi_idPK");
> NOTICE: ALTER TABLE / ADD PRIMARY KEY creará el índice implícito "jordi_idPK"
> para la tabla "jordi"
>
>
> Here is the error
> ixmati=# select * from jordi where jordi_idPK = 1;
--
Sinceramente,
Josué Maldonado.
"Theta pone orden en el caos conquistando todo lo que en mest pueda ser
prosupervivencia y destruyendo todo lo que en mest pueda ser
contrasupervivencia, al menos por medio de organismos vivos."
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2004-07-05 19:03:35 | Re: Serials in where clause |
Previous Message | Bruce Momjian | 2004-07-05 18:33:50 | Re: Do we need more emphasis on backup? |