Now see what parameters reference the AccountNBR data type : Create Type « Data Types « SQL Server / T-SQL Tutorial






3>
4> CREATE TYPE dbo.AccountNBR FROM char(14) NOT NULL
5> GO
1>
2>
3> SELECT OBJECT_NAME(p.object_id) Table_Name, p.name Parameter_Name
4> FROM sys.parameters p
5> INNER JOIN sys.types t ON
6> p.user_type_id = t.user_type_id
7> WHERE t.name = 'AccountNBR'
8> GO
Table_Name
         Parameter_Name

------------------------------------------------------------------------------------------------------------------------
-------- ---------------------------------------------------------------------------------------------------------------
-----------------
1>
2> drop type dbo.AccountNBR
3> GO
1>








5.6.Create Type
5.6.1.The syntax of the CREATE TYPE statement is as follows:
5.6.2.Creating and Using User-Defined Types
5.6.3.Identifying Columns and Parameters that Use User-Defined Types
5.6.4.Now see what parameters reference the AccountNBR data type
5.6.5.Dropping User-Defined Types