D
D
Dmitry Korolev2017-11-04 01:17:17
C++ / C#
Dmitry Korolev, 2017-11-04 01:17:17

How to avoid numeric id being out of range?

In my program, records are constantly created in one table, and when there are more than 10 of them, the oldest one is deleted.
What to do with the identifier on the increment, because it will jump out of the tinyint?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
C
cicatrix, 2017-11-04
@adressmoeistranici

If this is about a database and an id field with a dimension of tinyint, then it's easier to remove identity altogether and assign the id yourself explicitly.

A
Artyom Karetnikov, 2017-11-04
@art_karetnikov

Id is better to do always INT.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question