|   | ![]() |
|
SQL Server 7.0 Datatypes 1 2 3 4 5 6 Text and Image DatatypesIn previous versions of SQL Server, it was considered a mortal sin to use a text or image datatype. There were a lot of restrictions on these datatypes and specialized functiosn had to be used to work with them. Because of all of the special handling required for text and image columns, table corruption was very frequent. However they were still used, simply because 255 characters was very limiting. The good news is that text handling in SQL Server 7.0 has been dramatically improved. Text and image columns are now much more stable. Using a text column is no longer much of a problem, except the 8000 character limit on a simple char or varchar column reduces the need for a text column.
Binary Datatypes
Special Datatypes There are a small number of specialized datatypes that can be used within SQL Server. One of the more commonly used datatypes is a timestamp. The name of this datatype is a misnomer. It does not store a time nor can you derive a time from it. It is a binary value based partly upon the system clock. This column affords you a unique value within your table. A column of this datatype is handled internally by SQL Server. Every insert and update will change the value in this column and no other row in the table will have the same value. An example of a timestamp value is: 0x01000000a3d2ae08. A new datatype introduced in SQL Server 7.0 is the uniqueidentifier. The uniqueidentifier is very similar to a timestamp datatype. The difference is in scope. A timestamp is unique within the table it is defined in. A uniqueidentifier is unique across all databases on the server. The sysname datatypes is included here for completeness. This datatype is used within the system tables and should not be used on any of your tables.
|
All content on this site, except where noted, represents an original work of Michael R. Hotek and is protected by applicable copyright laws. The SQL Server FAQ is the sole work of Neil Pike. No page, portion of a page, or download may be used for commercial purposes in whole or in part without the express, written permission of the applicable author.