Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 656
Neo Avatar asked Nov 07 '12 10:11

Neo


People also ask

How do I get a list of user-defined table types in SQL Server?

Once you connect to a database in SSMS, you can view these data types by navigating to Programmability-> Types->System Data Types.

How do I get table details in SQL Server Management Studio?

Using SQL Server Management Studio In Object Explorer, select the table for which you want to show properties. Right-click the table and choose Properties from the shortcut menu. For more information, see Table Properties - SSMS.


1 Answers

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.

like image 57
Thangamani Palanisamy Avatar answered Nov 13 '22 18:11

Thangamani Palanisamy