--======================================== --User defined table type CREATE TYPE dbo.utTest AS TABLE ( UserID INT PRIMARY KEY, UserName NVARCHAR(200) ) GO DECLARE @T dbo.utTest INSERT INTO @T(UserID,UserName) SELECT 1, 'C1' UNION SELECT 2,'C2' SELECT * FROM @T GO DROP TYPE dbo.utTest GO --======================================== --User defined data type CREATE TYPE [dbo].[udTest] FROM [int] NULL GO DECLARE @T [dbo].[udTest] SET @T=10 SELECT @T GO DROP TYPE [dbo].[udTest]