Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How many data types are there in the fields in the table

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article will explain in detail how many data types there are in the fields in the table. The editor thinks it is very practical, so I share it with you as a reference. I hope you can get something after reading this article.

The data types of the fields in the table are: 1, binary type; 2, string type; 3, Unicode data type; 4, date and time data type; 5, numerical data type; 6, currency data type; 7, special data type and so on.

There are several field types in the database table:

1. Binary type

Binary 、 Varbinary 、 Image

2. String type

Type size use CHAR0-65535 bytes fixed-length string VARCHAR0-65535 bytes variable length string TINYBLOB0-255binary string TINYTEXT0-255bytes short text string BLOB0-65535 bytes long text data TEXT0-65535 bytes long text data MEDIUMBLOB0-16 777 215 bytes binary medium length text data MEDIUMTEXT0-16 777 215 bytes medium length text data LONGBLOB0-4 294 967 295 bytes Extremely large text data in binary form LONGTEXT0-4 294 967 295 bytes maximum text data

3. Unicode data type

Including Nchar,Nvarchar and Ntext

4. Date and time data types

Type size

(bytes) range format use DATE31000-01-01 23:59:59YYYY-MM-DD HH:MM:SS 9999-12-31YYYY-MM-DD date value TIME3'-838:59:59'/'838:59:59'HH:MM:SS time value or duration YEAR11901/2155YYYY year value DATETIME81000-01-01 00Gang 00hand 9999-12-31 23:59:59YYYY-MM-DD HH:MM:SS mixed date and time value TIMESTAMP4

1970-01-01 00VOG 0000GOUBER 2038

The end time is the 2147483647 second, Beijing time 2038-1-19 11:14:07 Beijing time, 03:14:07 GMT on January 19, 2038

YYYYMMDD HHMMSS mixed date and time values, timestamp

5. Numerical data types

Type size range (signed) range (unsigned) use TINYINT1 byte (- 128127) (0255) small integer value SMALLINT2 bytes (- 32 768 minus 32 767) (0mei 65 535) large integer value MEDIUMINT3 bytes (- 8 388 608 minus 8 388 607) (0mei 16 777 215) large integer value INT or INTEGER4 bytes (- 2147 483 648 minus 2147 483 647) (0r4 294 967 295) large integer value BIGINT8 bytes 18 446 744 073 709 551 615) maximal integer value FLOAT4 bytes (- 3.402 823 466 Equ 38), 0, (1.175 494,351 Elam 38), 0, (1.175 494,351 Ecolor 38) single precision

Floating-point number DOUBLE8 bytes (- 1.797 693 134 862 315 7 Ecolors 308), 0, (2.225 073 858 507 201 4 Elyle 308), 0, (2.225 073 858 507 201 4 Elyle 308) 0, (2.225 073,858 507 201 4 Elam 308 1.797 693 134 862 315 7) double precision

Floating-point values DECIMAL to DECIMAL (M > D), if M > D, it is M > D, otherwise it is M and D dependent on M and D values, depending on M and D decimal values.

6. Monetary data type

Represents a positive or negative amount of money.

7. Special data types

There are three special data types, namely Timestamp, Bit, and Uniqueidentifier.

This is the end of the article on "how many data types are there in the fields in the table". I hope the above content can be helpful to you, so that you can learn more knowledge. if you think the article is good, please share it for more people to see.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report