Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the base type of a UDT in Sql Server 2005?

I have my type "x" of type varchar(50). How can I alter it to varchar(100)? It seems I can't!

like image 637
Ricibald Avatar asked Dec 08 '08 10:12

Ricibald


1 Answers

you can't. what you can do is

  • script all objects that contain the type using OBJECT_DEFINITION.
  • drop them.
  • recreate type with new length
  • recreate the objects.
like image 78
Mladen Prajdic Avatar answered Sep 17 '22 15:09

Mladen Prajdic