سؤال

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