Data types in MySQL

Source: Internet
Author: User

1. Integers:

Tinyint:1 bytes -128~127

Smallint:2 bytes -32768~32767

Int:4 bytes

Bigint:8 bytes

2. Fixed-point number:

Decimal decimal Position fixed

3. Floating point number

Float:4 bytes

Doule:8 bytes

4. Date, time

Data: Represents only a single date

Time: Can represent a point or interval in a day, can be negative, minimum: 839 hours 59 minutes 59 seconds Max: 839 hours 59 minutes 59 seconds

Datatime: Even date band: A.D. January 1, 1000 0:0 0 seconds to December 3, 9999, 23:59 59 seconds

5. Text type

Char: Represents fixed-length text (char (5), which represents a string of length 5, and if it is char (3), the system automatically complements two spaces)

VARCHAR: (the system allocates bytes according to the actual length)

Text: A data type that stores large text and cannot be queried when the condition

6. Binary

Bit: The system will convert the data into binary type

Data types in MySQL

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.