| От | Andre Schubert |
|---|---|
| Тема | Last_Inserted Value |
| Дата | |
| Msg-id | 3CA2CF1F.3451C5B4@km3.de обсуждение исходный текст |
| Ответы |
Re: Last_Inserted Value
|
| Список | pgsql-admin |
Hi all, i have a little question on getting the last inserted value from a table. Lets say i have a transaction which does the following. insert into foo values(1); insert into bar values(2); insert into foobar values(3); All three tables use the same sequence to increment their id. I want to know if it is possible to find the id of the inserted value of foo. Can i do a select id from foo order by id desc limit 1 before the end of the transaction, does this return exactly the row i inserted for this transaction? Thanks in advance
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера