I have been told that thoracic herniations can happen too, but they are extremely rare and would most likely not be asked on a board exam (these would typically be seen in someone with some other path going on).
If you herniate the disc between L4- L5, the L5 nerve is affected. I was also told to watch out for any instance where they just say L4 disc, so you would have to know that they mean L4-L5, and that the L5 nerve is the one that is affected.