Directly code: select 'bigint unsigned' as type ,'8' as bytes ,~0 as max_num,0 as min_num union select 'int unsigned','4',~0>>32,0 union select 'mediumint unsigned','3',~0>>40,0 union select 'smallint unsigned','2',~0>>48,0 union select 'tinyint unsigned','1',~0>>56,0 union select 'signed bigint','8',~0>>1,-(1<<63) union select 'signed int','4',~0>>33,-(1<<31) union select 'signed mediumint','3',~0>>41,-(1<<23) union select 'signed smallint','2',~0>>49,-(1<<15) union select 'signed tinyint','1',~0>>57,-(1<<7); +--------------------+-------+----------------------+----------------------+ | type | bytes | max_num | min_num | +--------------------+-------+----------------------+----------------------+ | bigint unsigned | 8 | 18446744073709551615 | 0 | | int unsigned | 4 | 4294967295 | 0 | | mediumint unsigned | 3 | 16777215 | 0 | | smallint unsigned | 2 | 65535 | 0 | | tinyint unsigned | 1 | 255 | 0 | | signed bigint | 8 | 9223372036854775807 | -9223372036854775808 | | signed int | 4 | 2147483647 | -2147483648 | | signed mediumint | 3 | 8388607 | -8388608 | | signed smallint | 2 | 32767 | -32768 | | signed tinyint | 1 | 127 | -128 | +--------------------+-------+----------------------+----------------------+ rows in set (0.00 sec) The above example of using a MySQL statement to find out the number of bytes occupied by various integers and their maximum and minimum values is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. You may also be interested in:
|
<<: Handtrack.js library for real-time monitoring of hand movements (recommended)
>>: Install OpenSSH on Windows and log in to the Linux server by generating an SSH key
1. Linux installation (root user operation) 1. In...
Preface The server used by the blogger was purcha...
1. The color of the scroll bar under xhtml In the ...
This article mainly introduces the Mysql backup m...
Preface: When we need to store decimals and have ...
/******************** * Character device driver**...
Preface The string types of MySQL database are CH...
In many cases, in order to beautify the form, the ...
In actual work or interviews, we often encounter ...
After I installed MySQL, when I tried to save and...
Table of contents 1. ACID Characteristics Transac...
After setting the iframe's src to 'about:b...
This article shares the specific code of JavaScri...
On web pages, we often encounter this situation: ...
<br />The countless information on the Inter...