> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.vibegames.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# SQL Error: Duplicate entry 'xxxxxxx' for key 'PRIMARY' (or else)

|| Do you get the error _Duplicate entry 'societypolice' for key 'PRIMARY'_ while importing an SQL file? We will explain why this happens, and how to avoid this!

![](https://i.imgur.com/S0Ds3rP.png)
_Of course, 'societypolice' can be another name in your case_

1. The first reason why this is happening, is because you are importing an SQL file for the second time, and all tables are already filled up with data. Because the PRIMARY key in this table is a name, and not an auto incrementing number. Primary keys cannot be duplicate, so check the table, and delete the row that already exists.

2. You have a bad SQL file with duplicate INSERT rows. Try to remove the duplicates, or contact the creator of the SQL file to fix this.

| We hope this makes it a little bit more clear, why this is actually happening.