Where I can check user-define table type in SQL Server 2008 in SSMS? and how can I insert new column into it?

╄→尐↘猪︶ㄣ 提交于 2019-12-23 09:13:14

问题


I need to add some more columns into my current user-define table type in SQL Server 2008

But I didn't see any table type in particular database under Tables .

Where exactly I need to check and how can I modify the design of existing user-define table type in SQL Server 2008

I'm using SQL SERVER 2008 and SSMS

Where I can find that table in SSMS ,

so that I can go and modify table type.

thanks

for previous question answer

Please can any one help to sql alter type table syntax add column ? how can I insert any new column ... as ALTER is not working.. it is disable


回答1:


User-defined types cannot be modified after they are created, because changes could invalidate data in the tables or indexes. To modify a type, you must either drop the type and then re-create it, or issue an ALTER ASSEMBLY statement by using the WITH UNCHECKED DATA clause. For more information, see ALTER ASSEMBLY (Transact-SQL).

Points to take care while using user defined table type

1.Default values are not allowed.

2.Primary key must be a persisted column.

3.Check constraint can not be done on non persisted computed columns

4.Non clustered indexes are not allowed.

5.It can't be altered. You have to drop and recreate it.



来源:https://stackoverflow.com/questions/13267862/where-i-can-check-user-define-table-type-in-sql-server-2008-in-ssms-and-how-can

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!