Re: How to copy value between tables
| От | Oliveiros C, |
|---|---|
| Тема | Re: How to copy value between tables |
| Дата | |
| Msg-id | 158688401F5F4A39B3ED2E328F5B3926@marktestcr.marktest.pt обсуждение исходный текст |
| Ответ на | How to copy value between tables (Michael Rowan <mike.rowan@internode.on.net>) |
| Список | pgsql-novice |
Howdy, Michael. I didnt try your query, but at first glance, it seems OK, why do you ask? Did you try and it gave u some kind of error? Best, Oliveiros ----- Original Message ----- From: "Michael Rowan" <mike.rowan@internode.on.net> To: "postgresql novice" <pgsql-novice@postgresql.org> Sent: Wednesday, August 26, 2009 2:40 PM Subject: [NOVICE] How to copy value between tables > 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 > > > > > -- > Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-novice
В списке pgsql-novice по дате отправления: