Search code examples
sql-serversql-server-2005user-defined-types

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!


Solution

  • 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.