How to copy value between tables - Mailing list pgsql-novice

From Michael Rowan
Subject How to copy value between tables
Date
Msg-id FD26DAF7-9E4B-47F2-A9AD-7E3DE1AFAC0B@internode.on.net
Whole thread Raw
List pgsql-novice
Will the following work?

UPDATE child SET child_name = (SELECT parent_name FROM parent WHERE
parent_id = child_parent_id) WHERE child_name = 'not known' ;

That is, copy the parent_name into the corresponding child_name if the
child_name was 'not known'


Michael Rowan
mike.rowan@internode.on.net

11 Kingscote Street
ALBERTON
South Australia 5014

tel 618 8240 3993




pgsql-novice by date:

Previous
From: Jignesh Shah
Date:
Subject: Re: compilation error
Next
From: "Oliveiros C,"
Date:
Subject: Re: How to copy value between tables