How to alter user defined table types

ganesh picture ganesh · Apr 25, 2015 · Viewed 25.3k times · Source

I have already tried to alter the user defined table types but it is not working with alter commend.

alter TYPE [dbo].[GriDDateTab] AS TABLE(
    [Application [varchar](50) NOT NULL,
    [LandDist] [char](2) NULL,
    [Land] [char](3) NULL,
    [LandVi] [char](4) NULL)

Answer

dmeglio picture dmeglio · Apr 25, 2015

You have to drop and recreate. That means if you have any references (eg stored procedures) using the type, that reference must be removed first.