Database Knowledge Base / MS SQL Server /
Add comment
Name:
Email:
* Comment:
(Use BBcode - No HTML)
code
* Confirmation code:   Write the characters in the image above exactly as you see it


What are user defined datatypes and when you should go for them?

User defined datatypes let you extend the base SQL Server datatypes by providing a descriptive name, and format to the database. Take for example, in your database, there is a column called Flight_Num which appears in many tables. In all these tables it should be varchar(8). In this case you could create a user defined datatype called Flight_num_type of varchar(8) and use it across all your tables. 

See sp_addtype, sp_droptype in books online.




RSS