Re: Select into

From: Gavin 'Beau' Baumanis <gavinb(at)eclinic(dot)com(dot)au>
To: Craig Ringer <craig(at)postnewspapers(dot)com(dot)au>
Cc: Gurjeet Singh <singh(dot)gurjeet(at)gmail(dot)com>, pgsql-sql(at)postgresql(dot)org, "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com>
Subject: Re: Select into
Date: 2008-03-20 12:20:27
Message-ID: 50DE8714-0EC7-432D-845B-4F8E6FE136DC@eclinic.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi Everyone,

I want to thank everyone for their help / suggestions...
I really appreciate it.

Though I think I have found a winner.

> craig=# update x set val = foundrow.val from ( select val from x
> where id = 2 ) as foundrow where id = 1 ;
> UPDATE 1
>

Very elegant, very clean...
Very nice!

Thanks!!!!

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Craig Ringer 2008-03-20 12:49:25 Re: Select into
Previous Message Gurjeet Singh 2008-03-20 12:14:23 Re: Select into