1
In languages such as Java, for example, when processing a short int and comparing it with another short int, both are transformed into int. The same occurs in databases like Mysql?
1
In languages such as Java, for example, when processing a short int and comparing it with another short int, both are transformed into int. The same occurs in databases like Mysql?
0
The two types cited are integer, what changes is how much each type supports.
smallint: (2 bytes) -32768 to +32767 (with signal) / 0 to 65535 (without signal)
int: (4 bytes) -2147483648 to +2147483647 (with signal) / 0 to 4294967295 (without signal)
To know which type to use as PK, must be analyzed the amount of information you will have.
Browser other questions tagged mysql database performance comparison
You are not signed in. Login or sign up in order to post.
What is the relevance? And I don’t know if this happens with Java, have any source? It has consequence?
– Maniero