N
Neon16mo ago
sensitive-blue

How can I reset the serial primary key when truncating a table?

No description
1 Reply
afraid-scarlet
afraid-scarlet16mo ago
Try TRUNCATE TABLE your_table_name RESTART IDENTITY CASCADE; Looks like you have a Foreign Key error preventing the reset CASCADE being the key addition

Did you find this page helpful?