Basic mysql Data Types

Source: Internet
Author: User

Basic mysql Data Types
1. Data type refers to the data features of columns, stored procedure parameters, expressions, and local variables. It determines the data storage format and represents different information types.
2. The larger the storage range, the larger the occupied space.
3. Integer Data Types (in ascending order of storage capacity): TINTINT, SMALLINT, MEDIUMINT, INT, BIGINT
4. FLOAT Type: FLOAT [(M, D)]: M indicates the total number of digits, and D indicates the number of digits after the decimal point. If M and D are omitted, the values are saved according to the restrictions allowed by the hardware. The single-precision floating point number is precise to about 7 decimal places.
5. DATE type: YEAR, TIME, DATE, DATETIME, TIMESTAMP. In actual development, the date type is rarely used. Generally, the number type is used.
6. character Type: CHAR (M): M bytes, 0 <= M <= 255, VARCHAR (M): L + 1 bytes, L <= M and 0 <= M <= 65535, TINYTEXT, L + 1 byte, of which L <2 ^ 8
TEXT: L + 2 bytes, of which L <2 ^ 16, MEDIUMTEXT: L + 3 bytes, of which L <2 ^ 24, LONGTEXT: L + 4 bytes, L <2 ^ 32, ENUM ('value1', 'value2'): one or two bytes, depending on the number of enumeration types (up to 65535)
SET ('value1', 'value2'): 1, 2, 3, 4, or 8 bytes, depending on the number of set members (up to 64 ).

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.