How to copy value between tables

Поиск
Список
Период
Сортировка
От Michael Rowan
Тема How to copy value between tables
Дата
Msg-id FD26DAF7-9E4B-47F2-A9AD-7E3DE1AFAC0B@internode.on.net
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Jignesh Shah
Дата:
Сообщение: Re: compilation error
Следующее
От: "Oliveiros C,"
Дата:
Сообщение: Re: How to copy value between tables