postgresql modified self-energizing start id number

Methods: The current maximum current id as the id auto-increment start number

#使用语句: 
select setval('your_table_id_seq',(select max(id) from 表名));
#如何查看 
your_table_id_seq?
#使用命令:\d 表名

Gave the following results, Figure circled in red box:
Here Insert Picture Description
要是还有不太明白的地方请留言,评论必回
要是对我的文章感兴趣的话,关注一下吧,谢谢!

Previous: the FTP client to upload files to the server

Next: FTPClient file upload problem

Guess you like

Origin blog.csdn.net/chen_2890/article/details/94727594