views:

463

answers:

1

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

+3  A: 

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.
Mladen Prajdic
Correct. There is "CREATE TYPE" and "DROP TYPE" but no "ALTER TYPE".
gbn
You can vote for "ALTER TYPE" syntax on https://connect.microsoft.com/SQLServer/feedback/details/319134/msft-mso-support-alter-type
vasek7