Skip site navigation (1) Skip section navigation (2)

Re: [INSERT]Return a value

From: Leví Teodoro da Silva <tlevisilva(at)gmail(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: Re: [INSERT]Return a value
Date: 2008-11-07 14:04:13
Message-ID: 4a74ba520811070604g7e630e96h7159f435db37c40e@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-novice
When  try to execute it on pgadmin :

BEGIN;
INSERT INTO "Login"(
            "CPF", "password", status, "idSeller")
    VALUES ('1', '1', 'ok', '1') RETURNING "CPF";
COMMIT;

I got the follow :

*Query result with 1 rows discarded*

Query returned successfully with no result in 0 ms.


But i dont want discard the result =/

Thanks,
Leví

2008/11/7 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> "=?ISO-8859-1?Q?Lev=ED_Teodoro_da_Silva?=" <tlevisilva(at)gmail(dot)com> writes:
> > INSERT INTO "Login"(
> >             "CPF", "password", status, "idSeller")
> >     VALUES ('108', '12345', 'ok', '2555') RETURNING "CPF" INTO STRICT
> teste;
>
> It looks like you are trying to do this at the SQL level, in which case
> you should leave off the INTO bit.
>
>                        regards, tom lane
>

In response to

Responses

pgsql-novice by date

Next:From: Tom LaneDate: 2008-11-07 14:07:26
Subject: Re: [INSERT]Return a value
Previous:From: Tom LaneDate: 2008-11-07 13:50:56
Subject: Re: [INSERT]Return a value

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group