 |
|
SQL Server Tips by Burleson |
Data types for data structure use
There are two data types that can be used in tables only:
Timestamp.
Uniqueidentifier.
Timestamp
Timestamp is an eight byte integer, for version control of table
data. Each table can have one timestamp only. The value of a
timestamp is changed by SQL Server for every changed row. In each
database the values of timestamp columns are unique.
Uniqueidentifier
Uniqueidentifier is a 16 byte binary data that is generated by SQL
Server based on the MAC address and the system time. It is used to
ensure that primary keys have unique values for any computer in the
world. In a network with many computers inserting data this is a
mechanism that avoids errors when trying to insert a row with a
primary key that already exists.
The above book excerpt is from:
Super SQL
Server Systems
Turbocharge Database Performance with C++ External Procedures
ISBN:
0-9761573-2-2
Joseph Gama, P. J. Naughter
http://www.rampant-books.com/book_2005_2_sql_server_external_procedures.htm |