I have one UDD, which is used in some tables.
Now i want to change its length. How can i do that ?The only way i know of is to drop it and re-create it...
sp_droptype
sp_addtype
but you can't drop a type if it's being referenced by any columns
The way to go would be this:
EXEC sp_rename UDName, old_UDName
EXEC sp_addtype UDName, 'varchar(20)'
ALTER TABLE tbl1 ALTER COLUMN col1 UDName
ALTER TABLE tbl2 ALTER COLUMN col2 UDName
HTH. Ryan
"Vikram" <aa@.aa> wrote in message
news:e7qkGn9KGHA.2012@.TK2MSFTNGP14.phx.gbl...
>I have one UDD, which is used in some tables.
> Now i want to change its length. How can i do that ?
>sql
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment