I have a TVP like below:

CREATE TYPE TestTableType AS TABLE
 (
    Id INT,
    AnswerId INT
 );

In this TVP I want to Add one more column AnswerText, How to do that without drop TVP (I did not have permission to drop TVP).

有帮助吗?

解决方案

See http://msdn.microsoft.com/en-us/library/bb675163.aspx it states: You cannot use ALTER TABLE statements to modify the design of table-valued parameters.

Also see How to ALTER the Table Value Parameter for good way to modify it without downtime by creating a new TVP and using it temporarily while you drop and recreate the original TVP.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top