In SQL Server Management Studio, open a database in the object explorer
Now, expand database -> Programmability -> Types -> User-defined Data Types
Right click on 'User-defined Data Types' and choose 'New User-Defined data type'. Enter you data type properties and save. Now you can use the data type you just defined in any queries \ stored procedures etc.
Or, you can define in Visual studio - follow this article
Creating User-Defined Data Types in SQL Server 2005[
^]