| От | Aarni Ruuhimäki |
|---|---|
| Тема | Copying a row within table |
| Дата | |
| Msg-id | 200603140919.49246.aarni@kymi.com обсуждение |
| Ответы |
Re: Copying a row within table
Re: Copying a row within table |
| Список | pgsql-sql |
Hi people, testing=# INSERT INTO foo (SELECT * FROM foo WHERE foo_id = 2); ERROR: duplicate key violates unique constraint "foo_pkey" testing=# testing=# INSERT INTO foo (foo_1, foo_2, foo_3 ...) (SELECT foo_1, foo_2, foo_3 ... FROM message_table WHERE foo_id = 10); INSERT 717286 1 testing=# Is there a fast way to copy all but not the PK column to a new row within the same table so that the new foo_id gets its value from the sequence ? TIA and BR, Aarni -- Aarni Ruuhimäki -------------- This is a bugfree broadcast to you from **Kmail** on **Fedora Core** linux system --------------
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера