# Error 1171: All parts of a PRIMARY KEY must be NOT NULL

| Error Code | SQLSTATE | Error                         | Description                                                                                |
| ---------- | -------- | ----------------------------- | ------------------------------------------------------------------------------------------ |
| 1171       | 42000    | ER\_PRIMARY\_CANT\_HAVE\_NULL | All parts of a PRIMARY KEY must be NOT NULL; if you need NULL in a key, use UNIQUE instead |

## Possible Causes and Solutions

{% hint style="success" %}
This article doesn't currently contain any content. [You can help!](https://app.gitbook.com/s/WCInJQ9cmGjq1lsTG91E/about/readme/contributing-documentation)
{% endhint %}

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
