Created
October 25, 2013 03:57
-
-
Save laozhu/7149256 to your computer and use it in GitHub Desktop.
解决postgresql下的主键冲突问题
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT setval('tablename_id_seq', (SELECT MAX(id) FROM tablename)+1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment