Question

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).

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top