Friday, 28 July 2017

SQL statement to get column from table type table

//Sql Query


select c.name,t.name from sys.columns asJOIN sys.types AS t ON c.user_type_id=t.user_type_id

WHERE c.object_id IN ( SELECT type_table_object_id FROM sys.table_types WHERE name =  'TableType table name') order by c.column_id

No comments:

Post a Comment

How to highlight selected text in notepad++

  –> To highlight a block of code in Notepad++, please do the following steps step-1  :- Select the required text. step-2  :- Right click...