Leaving the option of changing jobs open is not the same as threatening to leave. A more effective tactic is asking your employer to help you stay in a position you love. Miller breaks down the difference:
Threatening:
"I've got another offer. If you don't give me a raise, I'm going to leave."
"That could work," says Miller, "but the boss isn't going to like it."
Asking:
"I really love it here, but I've got this other offer, and it's a lot more money. Is there anything you can do to help me get to the market rate? I don't want to take this offer, but it's made it clear I'm being compensated way below market. Can you help me?"
"When you ask for help in getting up to market rates, it engenders a very different response," Miller says. "It's not about threatening to leave, but about making sure your employer knows you're happy there ... but other people are calling."
However, he emphasizes, don't lie about having another offer. If you don't have one, you can go out and get one, but make sure you're approaching your employer with the truth.