I want to define a tinyint with an accepted range of 0 - 10. I know how to use triggers to validate a column and achieve this effect.
However, is it possible to create a user-defined data type that specifies this range as a rule? Then, if a value outside of range is attempted, of course an error would be thrown automatically, without the need of triggers?
Use a CHECK constraint rather than user defined types which are quite awkward to use