Well first job is to add the column with an alter table statement.
As in something like
Alter Table Animals Add AnimalTypeCode int null
Then you need to poulate it, that would be with a bunch of update statements
Say with something like
Update Animals
Set AnimalTypeCode = 12367
Where Code = 123
or if say Crocodile was 679
Update Animals
Set AnimalTypeCode = 12367
Where Code in (123,679)
Or if you prefer it a bit more readable
Update Animals
Set AnimalTypeCode = 12367
Where Animal in ('Alligator','Crocodile')
Keep bashing away until they all got one, perhaps adding some new types as required, thenn you can add a foreign key.
No easy way to do this unless you've stashed away a table somewhere linking animal to animal type
Editted to add. Given AnimalCode = AnimalTypeCode * 100 + ? then
Update Animals
Set AnimalTypeCode = Cast(AnimalCode / 100 as Int)
Might do the job
Select *
From Animals
outer join AnimalTypes On Animals.AnimalTypeCode = AnimalTypes.Code
Where AnimalTypes.Code is null
Will give you all those where animaltypecode is not pointing to an existing animal type.
The one you'll have to be wary of is 1269, Elephant, Bird(12). If you have anything like that you'll have to fix them individually.