Tip of the Day : Differences Between the Geometry and Geography Data Types

SQL Server Helper - Tip of the Day

Data Type Synonyms

Data type synonyms are included in SQL Server for ISO compatibility. Data type synonyms can be used instead of the corresponding base data type name in data definition language (DDL) statements, such DECLARE @variable, CREATE TABLE or CREATE FUNCTION. However, after the object is created, the synonyms have no visibility. When the object is created, the object is assigned the base data type that is associated with the synonym, instead of the synonym itself. There is no trail that the synonym was used in the statement that created the object.

Synonym SQL Server System Base Data Type
binary varying varbinary
char varying varchar
character char
character char(1)
character(n) char(n)
character varying(n) varchar(n)
dec decimal
double precision float
float[(n)] for n=1 to 7 real
float[(n)] for n=8 to 15 float
integer int
national character(n) nchar(n)
national char(n) nchar(n)
national character varying(n) nvarchar(n)
national char varying(n) nvarchar(n)
national text ntext
timestamp rowversion

Back to Tip of the Day List Next Tip