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
This article doesn't currently contain any content. You can help!
This page is licensed: CC BY-SA / Gnu FDL
PreviousError 1170: BLOB/TEXT column used in key specification without a key lengthNextError 1172: Result consisted of more than one row
Last updated
Was this helpful?
.png?alt=media&token=7e7f4c73-9972-4e67-9a1a-74dc18591022&width=260&dpr=4&quality=100&sign=760f8d93&sv=2)
.png?alt=media&token=ee5a45b3-d05b-4bb5-97d0-0f25c5eeb110&width=260&dpr=4&quality=100&sign=12bc3702&sv=2)