Its absolutely legal. Nobody is entitled to a raise by law and a company can give people raises, or choose NOT to give people raises as they see fit, for whatever reason, as long as its not based on a discriminatory reason (ie: race, creed, sex, etc.) The reason they gave you is unfortunately (for you), perfectly legit. He's told you how you can get a raise (by applying for another, higher paying job in the company) so if you want that raise, go on and apply. Good luck.