Subscribe

RSS Feed (xml)

Powered By

Skin Design:
Free Blogger Skins

Powered by Blogger

Search Your Question

Monday, May 5, 2008

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

User defined datatypes lets us 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.

refer to sp_addtype, sp_droptype.

No comments:

Archives