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)
The ALTER TABLE statement is used to add, delete, or modify columns in an existing table. The ALTER TABLE statement is also used to add and drop various constraints on an existing table.
User-defined table types are the predefined tables that the schema definition is created by the users and helps to store temporary data. User-defined table types support primary keys, unique constraints and default values, etc.
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.
The bad news is that you have to drop and re-create as SQL server does not (at least not up until 2012 support this.
The good news is that stored procedures and functions should pick up table type changes on the fly with no need to drop and re-create.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With