What is user defined datatypes and when you should go for them?User defined data types are based on system data types. They should be used when multiple tables need to store the same type of data in a column and you need to ensure that all these columns are exactly the same including length, and nullability.
Parameters for user defined datatype: Name System data type on which user defined data type is based upon. Nullability
For example, a user-defined data type called post_code could be created based on char system data type.What is user defined datatypes and when you should go for them? User defined datatypes is created by using base SQL Server data type by providing a descriptive name. They are created when there a column which appears in many tables. In this we can create a user defined datatypes and uses it across all the tables.
|