I am not getting option like 'ALTER TO' when am right clicking on TVP
I am not getting option like 'ALTER TO' when am right clicking on TVP
You cannot drop the User Defined Table Type as long as it's referenced by anything else:
Cannot drop type 'dbo.MyTableType' because it is being referenced by object 'MyStoredProcedure'. There may be other objects that reference this type.
It would be nice if SSMS gave you a listing of all other objects, but if you don't have many, a partially manual approach might work fine.
To get a list of all SPs that use your TVP type, you can query sys.sql_expression_dependencies
SELECT OBJECT_NAME(d.referencing_id)
FROM sys.sql_expression_dependencies d
WHERE d.referenced_id = TYPE_ID('MyTableType')
DROP and CREATE to new windowDROP PROCEDURE sectionDROP and CREATE to new window and make any changesCREATE sectionYou will get back the TVP and All the Sp's which uses the same TVP.