all SQL Server datatypes

mail@pastecode.io avatar
unknown
plain_text
7 months ago
803 B
1
Indexable
Never
CREATE TABLE TmpAllDatatypes (
	c1 bigint,
	c2 binary(50),
	c3 char(10),
	c4 date,
	c5 datetime,
	c6 datetime2(7),
	c7 datetimeoffset(7),
	c8 decimal(18,0),
	c9 float,
	c10 geography,
	c11 geometry,
	c12 hierarchyid,
	c13 image,
	c14 int,
	c15 money,
	c16 nchar(10),
	c17 ntext,
	c18 numeric(18,0),
	c19 nvarchar(50),
	c20 nvarchar(MAX),
	c21 real,
	c22 smalldatetime,
	c23 smallint IDENTITY(1,1) PRIMARY KEY,
	c24 smallmoney,
	c25 sql_variant,
	c26 text,
	c27 time(7),
	c28 timestamp,
	c29 tinyint,
	c30 uniqueidentifier UNIQUE,
	c31 varbinary(50),
	c32 varbinary(MAX),
	c33 varchar(50),
	c34 varchar(MAX),
	c35 xml,
	c36CustID nchar(5) FOREIGN KEY REFERENCES Customers(CustomerID),
	c37Computed AS (cast(c14 as varchar(50))+ cast(c20 as varchar(50)) + ' ' + cast(c30 as varchar(50)) + ' computed')
);