Re: Two table joins

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Two table joins
Дата
Msg-id 8995.1097850566@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Two table joins  (Kumar S <ps_postgres@yahoo.com>)
Список pgsql-novice
Kumar S <ps_postgres@yahoo.com> writes:
> My wrong SQL statement:

> update experiment SET samp_id =3 WHERE (select
> exp_slot_name = 4264.dat WHERE exp_slot_id =
> exp_slot_name);

I think you want something like

update experiment SET samp_id = 3
WHERE exp_slot_id = (SELECT exp_slot_id FROM exp_slot_table
                     WHERE exp_slot_name = '4264.dat');

            regards, tom lane

В списке pgsql-novice по дате отправления:

Предыдущее
От: "Joe Erickson"
Дата:
Сообщение: Re: Getting Started
Следующее
От: Tom Lane
Дата:
Сообщение: Re: copy error