| От | Richard Huxton |
|---|---|
| Тема | Re: copy a record from one table to another (archive) |
| Дата | |
| Msg-id | 004b01c0abc1$6bd78c60$1001a8c0@archonet.com обсуждение исходный текст |
| Ответ на | copy a record from one table to another (archive) (juerg.rietmann@pup.ch) |
| Ответы |
Re: copy a record from one table to another (archive)
|
| Список | pgsql-sql |
----- Original Message ----- From: <juerg.rietmann@pup.ch> To: <pgsql-sql@postgresql.org> Sent: Tuesday, March 13, 2001 12:45 PM Subject: [SQL] copy a record from one table to another (archive) > Hello there > > Is it possible to move a record from one table to another to do a archive > with a simple command like move .... ? > begin; insert into archive_foo (select * from foo where foo_id=1); delete from foo where foo_id=1; commit; Is probably the closest you could get. Alternatively, you could wrap the above up in a function and just go: select do_archive_foo(1); - Richard Huxton
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера