Re: [SQL] Re: Using the IN predicate in an UPDATE...

Поиск
Список
Период
Сортировка
От Gene Selkov Jr.
Тема Re: [SQL] Re: Using the IN predicate in an UPDATE...
Дата
Msg-id 199810142125.QAA03426@antares.mcs.anl.gov
обсуждение исходный текст
Ответ на Re: Using the IN predicate in an UPDATE...  (Herouth Maoz <herouth@oumail.openu.ac.il>)
Список pgsql-sql
> This query takes 20 years (poetic licence invoked ;-).
> Do you have a smarter way to accomplish this end:
>
> UPDATE table1 SET id = 2
> WHERE rec_num IN
>  ( SELECT rec_num
>    FROM table1
>    WHERE id = 1
>   );

I think the urge to do everything you might need inside the server can be disabling. I would export the table to a
file,fix it (with perl, sed, whatever) and import it back again. 

--Gene

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

Предыдущее
От: Herouth Maoz
Дата:
Сообщение: Re: Using the IN predicate in an UPDATE...
Следующее
От: Leslie Mikesell
Дата:
Сообщение: Re: [SQL] Using the IN predicate in an UPDATE...