Answer the question
In order to leave comments, you need to log in
Do fields need to be Unsigned?
We all often store all sorts of non-negative numbers in the database.
Question: Do they UNSIGNED or not?
Let's say there is a table with information about books .
Each book has some positive number of pages .
This number is stored in the database as SMALLINT .
Does it make sense to make this field UNSIGNED?
Answer the question
In order to leave comments, you need to log in
well, smallint (for the task of pages) maybe not
int, I’ll definitely
add it - tupanul, in general, smllint is necessary
, for example, you can store port numbers in smallint unsigned, it’s quite enough for a proxy base - there are definitely indexes on ports
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question