Re: Copy column contents

From: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>
To: "arun kv" <arun(at)library(dot)iisc(dot)ernet(dot)in>, "PGSQL" <pgsql-php(at)postgresql(dot)org>
Subject: Re: Copy column contents
Date: 2002-07-24 06:47:43
Message-ID: GNELIHDDFBOCMGBFGEFOEEFBCDAA.chriskl@familyhealth.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-php

UPDATE table SET email = title;

Chris

> -----Original Message-----
> From: pgsql-php-owner(at)postgresql(dot)org
> [mailto:pgsql-php-owner(at)postgresql(dot)org]On Behalf Of arun kv
> Sent: Wednesday, 24 July 2002 1:59 PM
> To: PGSQL
> Subject: [PHP] Copy column contents
>
>
> hai,
> I have a database table with 8 fields and i want to add a new
> column and copy the contents of one column to new column. if i try using
> select and insert number of rows is duplicating and insertion is going to
> end. how do i insert that contents to same row.
>
> i am getting something like :
>
> title | id | web | email | name
> aaa | 11 | | |
> bbb | 22 | | |
> ccc | | | |
> | | | |aaa|
> | | | |bbb|
> | | | |ccc|
>
>
> but i want as
>
> title | id | web | email | name
> aaa | 11 | | |aaa|
> bbb | 22 | | |bbb|
> ccc | | | |ccc|
>
>
> pls can anyone help me how do i go about this updation.
>
>
> thanks
> Arun
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>

In response to

Browse pgsql-php by date

  From Date Subject
Next Message emailharvest 2002-07-24 15:31:53 Harvest lots of E-mail addresses quickly !
Previous Message Chris 2002-07-24 06:08:11 Re: Copy column contents