SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1)

 

相关文章: