Data types in MySQL1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte
Source: http://blog.chinaunix.net/uid-10064369-id-2971161.htmlTable TypeMySQL has a lot of data table types, the more important of which is the myisam,innodb of these two kinds. Each of these two types has advantages and disadvantages, need to
Column type integer type tinyintMini-integer, the system takes one byte to hold the integer type, one byte =8byte, the maximum data is 0-255.smallintSmall integer, the system uses two bytes to save the integer type, can represent the integer type
ObjectiveAs in C + +, how many bytes are required to define an int type, and how many bytes are required to define the double type, MySQL has strict control over the data in each column of the table, which is key to the success of the data-driven
One, non-numeric type
Type
Range
Description
Char (N) [binary]
n=1~255 charactersBinary: Distinguish case
Fixed length
Std_name Cahr (+) NOT NULL
VarChar (N) [binary]
n=1~2
ObjectiveAs in C + +, how many bytes are required to define an int type, and how many bytes are required to define the double type, MySQL has strict control over the data in each column of the table, which is key to the success of the data-driven
MySQL Introduction 1, what is a database? A database is a warehouse that organizes, stores, and manages data according to its structure, which is generated more than more than 60 years ago, with the development of information technology and markets,
ObjectiveAs in C + +, how many bytes are required to define an int type, and how many bytes are required to define the double type, MySQL has strict control over the data in each column of the table, which is key to the success of the data-driven
First, the number type
Type
Range
Description
Char (N) [binary]
n=1~255 charactersBinary: Distinguish case
Fixed length
Std_name Cahr (+) NOT NULL
VarChar (N) [binary]
n=1~
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~83
1. The most basic dbms_output. Put_Line () method. Anywhere, as long as it is between begin and end, you can use Dbms_output. Put_Line (output); However, there is a problem with using this function to display up to 255 characters at a time,
1 bytes = 8 bits tinyint is a byte 2 of 8 times = 256 so store up to 256Date and time data types
MySQL data type
Meaning
Date
3 bytes, date, format: 2014-09-18
Time
3 bytes, time, format: 0
Data type
Use
Text
Any combination of characters, numbers, or characters and numbers that cannot be used for calculations. A maximum of 255 characters, with a default length of 50 characters. For the specified size, the
ObjectiveAs in C + +, how many bytes are required to define an int type, and how many bytes are required to define the double type, MySQL has strict control over the data in each column of the table, which is key to the success of the data-driven
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~83
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~8388607
1. Integral type
MySQL data type
Meaning (Signed)
tinyint (m)
1 byte range ( -128~127)
smallint (m)
2 byte range ( -32768~32767)
Mediumint (M)
3 byte range ( -8388608~83
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.