Hi folks,
In my sql code i'm passing around a bunch of magic numbers :-
AnimalType TINYINT
/*
AnimalType can be one of the following :-
1. Cat
2. Dog
3. Bird
....
*/
Is there anyway i could make this a custom type / enumeration. eg.
AnimalType ANIMAL
and it's constrained to contain a number between 1 <-> whatever (eg. 3 in my example above).
or constrained to strings. eg. AnimalType = 'Cat' .. etc ?
Cheers!
Edit
I know what LookUp tables are. This is not for a lookup table, but for some data passed to a number of stored procedures. Instead of passing in Magic Numbers, I wish to pass in an enumeration OR at least some contrained number (eg. numbers 1<->5), etc...