In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
What are the SQL SERVER data types, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain for you in detail, people with this need can come to learn, I hope you can gain something.
The data type describes the bit integer bit data type is an integer and its value can only be 0, 1, or null. This data type is used to store data with only two possible values, such as Yes or No, True or Fa lse, On or Off int integer int data types can store integers from-231 (- 2147483648) to 231 (2147483 647). This data type can be used for almost all numeric data stored in the database. This data type takes up 4 bytes in the database. The smallint integer smallint data type can store integers from-215 (- 32768) to 215 (32767). This data type is useful for storing numeric data that is normally limited to a specific range. This data type takes up 2 bytes of space in the database. The tinyint integer tinyint data type can store integers from 0 to 255. It is useful when you only intend to store a limited number of values. This data type occupies 1 byte in the database numeric precise numerical numeric data type is the same as decimal type decimal precise numerical decimal data type can be used to store numerical data with fixed precision and range from-1038-1 to 1038-1. When using this data type, you must specify a range and precision. The range is the total number of digits that can be stored around the decimal point. Precision is the number of digits stored to the right of the decimal point money monetary money data type used to represent money and monetary values. This data type can store data from-922 billion to 922 billion, and the 1/10000 smallmoney monetary smallmoney data type accurate to monetary units is used to represent money and currency values. This data type can store data from-214748.3648 to 214748.3647, and the 1/10000 float approximate numeric float data type accurate to monetary units is an approximate numeric type for floating-point numbers. Floating point numbers are approximate because not all numbers in their range can be accurately represented. Floating-point numbers can be any number from-1.79E+308 to 1.79E+308. Real approximate numeric real data types are approximate numeric types like floating-point numbers. It can represent floating-point numbers between-3.40E+38 and 3.40E+38. The datetime date-time type datetime data type is used to represent dates and times. This data type stores all date and time data during the day from January 1, 1753 to December 31, 1999, accurate to 1/300 seconds or 3.33ms Smalldatetime date-time type smalldatetime data type used to represent the date and time from January 1, 1900 to June 6, 2079, accurate to one minute cursor special data type cursor data type is a special data type that contains a reference to a cursor. This data type is used in stored procedures and cannot be used when creating tables. The timestamp special data type timestamp data type is a special data type used to create a database-wide unique number. There can be only one timestamp column in a table. The value of the timestamp column changes each time a row is inserted or modified. Although it has "time" in its name, the timestamp column is not a recognizable date. In a database, the timestamp value is the only Uniqueidentifier special data type Uniqueidentifier data type used to store a globally unique identifier, GUID. GUID is indeed globally unique. This number has little chance of being rebuilt in another system. You can use the NEWID function or convert a string to a unique identifier to initialize a column char character type char data type that is used to store non-uniformly coded data of a specified length. When defining a column of this type, you must specify the column length. This data type is useful when you always know the length of the data to be stored. For example, when you store data in a zip code plus 4 characters, you know it always takes 10 characters. The column width of this data type is up to 8000 characters varchar character type varchar data type, like the char type, it is used to store non-uniformly coded character data. Unlike the char type, this data type is longer. When defining a column for that data type, you specify the maximum length of the column. The biggest difference between it and the char data type is that the length of the storage is not the column length, but the length of the data text character type text data type is used to store a large number of non-uniformly coded character data. This data type can have up to 231-1 or 2 billion characters nchar Unicode character type nchar data type to store fixed length Unicode character type data. Unified coding uses a double-byte structure to store each character, rather than a single byte (in the case of plain text). It allows a large number of extended characters. This data type can store 4000 characters and doubles the byte space used by nvarchar Unicode character type nvarchar data type as variable length Unicode character type data. This data type can store 4000 characters and doubles the byte space used by ntext Unicode character type ntext data type to store a large number of Unicode character type data. This data type can store 230-1 or nearly 1 billion characters and doubles the byte space used by the binary binary data type binary data type to store fixed-length binary data up to 8000 bytes long. When the content of the input table is close to the same length, you should use this data type varbinary binary data type varbinary data type to store variable length binary data up to 8000 bytes long. When the content size of the input table is variable, you should use this data type image binary data type image data type to store variable length binary data, up to 231-1 or about 2 billion bytes
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.