# DB02001: Duplicate Record

## What This Means[​](#what-this-means "Direct link to What This Means")

The database tried to insert a record with an ID that already exists. Each record must have a unique identifier.

## Common Causes[​](#common-causes "Direct link to Common Causes")

* **Sync conflict** — Same data synced twice
* **Race condition** — Multiple operations creating same record
* **Data corruption** — IDs were corrupted or duplicated
* **Import issue** — Importing data that already exists

## How to Fix[​](#how-to-fix "Direct link to How to Fix")

### 1. Refresh Data[​](#1-refresh-data "Direct link to 1. Refresh Data")

Re-sync from the server:

* Pull latest data
* Let the sync process resolve conflicts
* The newer data should take precedence

### 2. Retry the Operation[​](#2-retry-the-operation "Direct link to 2. Retry the Operation")

If creating new records:

* The system may have already created it
* Check if the record exists
* Avoid clicking submit multiple times

### 3. Clear Local Cache[​](#3-clear-local-cache "Direct link to 3. Clear Local Cache")

Reset local data:

1. Clear the local database/cache
2. Login again
3. Sync data fresh

### 4. Check for Duplicates in WooCommerce[​](#4-check-for-duplicates-in-woocommerce "Direct link to 4. Check for Duplicates in WooCommerce")

If the issue persists:

* Check WooCommerce for duplicate entries
* Look for products/orders with same IDs
* Clean up any duplicates in the admin

### 5. Report Persistent Issues[​](#5-report-persistent-issues "Direct link to 5. Report Persistent Issues")

If this happens frequently:

* Note what actions cause it
* Check for patterns
* Report to support with details

## Why This Matters[​](#why-this-matters "Direct link to Why This Matters")

Duplicate IDs would cause:

* Confusion about which record is correct
* Data overwrites
* Sync issues

The error prevents data corruption.

## Related Errors[​](#related-errors "Direct link to Related Errors")

* [DB02002](/error-codes/DB02002.md) — Record Not Found
* [DB02003](/error-codes/DB02003.md) — Constraint Violation
