Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

check if user defined table type exists in sql server

IF NOT EXISTS (SELECT * FROM sys.types WHERE name = 'Users')
BEGIN
	CREATE TYPE [dbo].[Users] AS TABLE
	(
		UserName NVARCHAR(50),
      	UserSurname NVARHCAR(50),
        Age INT
     )
END
GO
 
PREVIOUS NEXT
Tagged: #check #user #defined #table #type #exists #sql #server
ADD COMMENT
Topic
Name
9+8 =