Default Generators for SQL Server Data Types
Every SQL data type has a default data generator that is associated with it. The default generator is automatically assigned to columns that have a particular SQL data type when you create a data generation plan.
Note
The default generator is automatically overridden for certain column constraints. For example, if an identity column and a foreign key column are integer columns, they use the SQL Computed Value and Foreign Key data generators, not the default Integer generator.
You can change the data generator in two ways:
You can change the data generator assigned to a particular column in a particular data generation plan. This change affects only the data generation plan in which you make the change. For more information, see Specifying Details of Data Generation for a Column.
You can change the data generator that is the default for a SQL data type. This change affects all new data generation plans that you create after you make the change. It also affects any columns that you add to existing data generation plans. For more information, see How to: Change the Default Generator for a Column Type.
Default Data Generators
The following sections describe the default generators that are associated with SQL data types. To see the same information in a single table, see Options (Database Tools/Data Generator/Default Generators).
Exact Numerics
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
bit |
Yes |
Yes |
Bit |
tinyint |
Yes |
Yes |
TinyInt |
smallint |
Yes |
Yes |
SmallInt |
int |
Yes |
Yes |
Integer |
bigint |
Yes |
Yes |
BigInt |
decimal |
Yes |
Yes |
Decimal |
numeric |
Yes |
Yes |
Decimal |
smallmoney |
Yes |
Yes |
Money |
money |
Yes |
Yes |
Money |
Approximate Numerics
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
float |
Yes |
Yes |
Float |
real |
Yes |
Yes |
Real |
Date and Time
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
smalldatetime |
Yes |
Yes |
DateTime |
datetime |
Yes |
Yes |
DateTime |
Character Strings
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
char |
Yes |
Yes |
String |
varchar |
Yes |
Yes |
String |
varchar(max) |
No |
Yes |
String |
text |
Yes |
Yes |
String |
Unicode Character Strings
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
nchar |
Yes |
Yes |
String |
nvarchar |
Yes |
Yes |
String |
nvarchar(max) |
No |
Yes |
String |
ntext |
Yes |
Yes |
String |
Binary Strings
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
binary |
Yes |
Yes |
Binary |
varbinary |
Yes |
Yes |
Binary |
varbinary(max) |
No |
Yes |
Binary |
image |
Yes |
Yes |
Image |
Other Data Types
SQL Data Type |
SQL 2000 |
SQL 2005 |
Default Data Generator |
---|---|---|---|
sql_variant |
Yes |
Yes |
Integer |
sysname |
Yes |
Yes |
String |
timestamp |
Yes |
Yes |
No default data generator. This data is calculated by SQL Server when it is inserted. |
uniqueidentifier |
Yes |
Yes |
Guid |
SQL user-defined types |
Yes |
Yes |
Determined by the base type of the user-defined type. |
.NET CLR user-defined types |
No |
Yes |
String |
xml |
No |
Yes |
String |
See Also
Concepts
Terminology Overview of Database Edition