B
B
BonBon Slick2019-02-16 12:21:04
Database
BonBon Slick, 2019-02-16 12:21:04

What if int PK is 0?

It never even occurred to me to sculpt 0 as the ID of the first record.
What happens if you put 0 as the ID for the first entry?
Possible mistakes?
Why does auto inc int PK start at 1?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Melkij, 2019-02-16
@BonBonSlick

Yes, at least start with INT_MIN, it doesn't matter for the counter to tick from 0, from 1, or from -2147483648.
One is just the default start value in most implementations (I'm not aware of examples of this, but they are possible).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question