| From: | "A(dot) Kretschmer" <andreas(dot)kretschmer(at)schollglas(dot)com> |
|---|---|
| To: | pgsql-novice(at)postgresql(dot)org |
| Subject: | Re: Subquery in INSERT? |
| Date: | 2006-10-17 12:13:21 |
| Message-ID: | 20061017121321.GE19268@a-kretschmer.de |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-novice |
am Tue, dem 17.10.2006, um 5:06:59 -0700 mailte Wilfred Benson folgendes:
> What I'm trying to do is copy a value from one column to another in the
> same table. The table looks like this:
>
> first | second
> ---------------------
> 1 |
> 2 |
> 3 |
> 4 |
> ...
>
> It's named 'copier'.
>
> The first column is sequence-generated, and the second has yet to have
> anything loaded (at this stage it's only a test table). So what I'm trying
> to do is quick copy of '1' from 'first' to 'second' with this query:
update copier set second = first;
Andreas
--
Andreas Kretschmer
Kontakt: Heynitz: 035242/47215, D1: 0160/7141639 (mehr: -> Header)
GnuPG-ID: 0x3FFF606C, privat 0x7F4584DA http://wwwkeys.de.pgp.net
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Berend Tober | 2006-10-17 12:38:14 | Re: Can we convert from Postgres to Oracle !!??? |
| Previous Message | Wilfred Benson | 2006-10-17 12:06:59 | Subquery in INSERT? |