Special Data (SQL)

Source: Internet
Author: User

Special Data includes data that cannot be expressed using the binary, character, Unicode, date and time, number, and currency data types described earlier.
Microsoft & reg; SQL Server & #8482; 2000 contains four special data types:
Timestamp
It is used to represent the activity sequence of SQL Server on one row, expressed in an ascending number in binary format. When the rows in the table change, update the time sequence using the time sequence value of the current database obtained from the @ DBTS function. Timestamp data is irrelevant to the date and time when data is inserted or modified. To automatically record the time when data changes in the table, use the datetime or smalldatetime data type to record events or triggers.
In SQL Serve, rowversion is a synonym for timestamp.
Bit
Bit data types can only include 0 or 1. Bit data types can be used to represent TRUE, FALSE, YES, or NO. For example, questions about whether the customer is visiting for the first time can be stored in the bit column.
Uniqueidentifier
A 16-bit hexadecimal number indicates a globally unique identifier (GUID ). You can use GUID to uniquely identify a row in multiple rows. For example, you can use the unique _ identifier data type to define a customer ID code column to edit the company's total customer list from multiple countries/regions.
SQL _variant
A data type that stores various data types supported by SQL Server (except for text, ntext, timestamp, and SQL _variant.
Table
A special data type that stores post-processing result sets. The table data type can only be used to define local variables of the table type or return values of user-defined functions.
User-Defined
User-Defined data types are allowed. For example, product_code can be designed to be in the format of two uppercase letters based on the char data type followed by a five-digit supplier number.

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.