C
C
Chipu2019-04-01 21:08:34
SQL
Chipu, 2019-04-01 21:08:34

What is the best way to start counting ID, from zero or one?

Good afternoon, tell me, is there any difference whether I start numbering from 0 or 1?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
abmanimenja, 2019-04-01
@Chipu

Moreover, because of the deletions, there will be gaps in the numbering.
Don't bother.

R
Ronald McDonald, 2019-04-01
@Zoominger

I have no idea what RDBMS/DBMS we are talking about, but in some, the zero index is reserved for the primary key.
In short, a question from the category "I'm driving along the road here, should I go left or right?".

S
Stalker_RED, 2019-04-01
@Stalker_RED

Autoincrement usually counts from one.

O
OnYourLips, 2019-04-01
@OnYourLips

Auto-increment counts from some specific value, and most often it is not 0 or 1, but the previous value that could have been removed, and the probability of this is high.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question