Or can you just use one or the other? I'd like to avoid redundancy while ensuring uniqueness by just using PRIMARY KEY but am wondering whether the added rows will AUTOINCREMENT by default.
Asked
Active
Viewed 52 times
-4
-
1Come on. Just try or google it. – juergen d Aug 28 '16 at 18:19
1 Answers
2
Yes, added rows will have automatically generated values for primary keys if you don't supply an explicit non-null value yourself. The algorithm for generating such values is slightly different with and without AUTOINCREMENT
keyword.

laalto
- 150,114
- 66
- 286
- 303