In SQL server ,while table creation we can use the SQL server datatype to create columns and also possible to use our own user data type.
If you are going to use the same data type with same length for your entire project ,then we can create our own user defined datatype and use it .
Now we will use our created datatype which is created in our previous post (Refer Here).
Create Table dbo.Student
(
StudentID Int Not Null,
Name Varchar(50) Not Null,
Department UserType
)
Now we have used our created datatype in the above table. So the user datatype will be very helpful in this kind of scenario.
No comments:
Post a Comment