SQL statement to set next serial value to max of a table?
От
Jean-Christian Imbeault
Тема
SQL statement to set next serial value to max of a table?
Дата
Msg-id
3D51A6E5.3090207@mega-bucks.co.jp
Список
Дерево обсуждения
Re: SQL statement to set next serial value to max of a table? rolf.ostvik@axxessit.no
I want to execute the following two pseudo-SQL statements (that set the
current value in a serial as the max of the primary key) as one SQL
statement. What is the proper syntax?
1- MAX = select max(id) from T;
2- SELECT setval('T_id_seq', MAX);
Jc
В списке pgsql-general по дате отправления
От: Glen Parker
Дата: