postgres set sequence value to max id

Solutions on MaxInterview for postgres set sequence value to max id by the best coders in the world

showing results for - "postgres set sequence value to max id"
Ian
25 Mar 2018
1SELECT setval('table_id_seq', (SELECT MAX(id) FROM table));