Don't do this. Well, do this, but don't use your offer as a negotiating chip -- use it as a backup plan if you don't get a raise.
You will be the first up against the wall if you accept a counter offer to stay.
You will be the first up against the wall if you accept a counter offer to stay.
That's a threat, sort of. But it's veiled enough that your boss can give you a raise without feeling like you forced his hand. He can give you a raise without it being step one in a two step plan to get rid of you.
If he doesn't... well, then you take the other offer.