Yes, this. I've seen it happen on several occasions.
Also: Let's say you use this tactic to strongarm the current employer into giving you a raise. But that won't make you happy. You looked for a different job because this one did not fulfill you -- and most of the time, the dissatisfaction is not money related.
If you aren't happy with the current gig, leave. If you like your job but feel you deserve more money, help the current employer recognize that and respond to it.