What happened

Target (TGT -1.32%) is soaring 12% higher in morning trading Wednesday, after the department store chain blew the doors off earnings with a record quarter.

So what

While a number of retailers have reported better-than-expected results amid a catastrophe for the broader industry, Target saw its best comparable-store sales gain ever and the doubling of online revenue over the year-ago period. In addition, it was still able to post gains at its stores, something even Walmart couldn't do.

A group of Target employees in a store aisle

Image source: Target.

Now what

Like Walmart, Target was given a competitive advantage by being deemed an essential business and allowed to keep its stores open. Where specialty retailers had to rely upon their e-commerce channels to survive, Target was able to take a dual track and widen its moat.

Now, even as most retail is allowed to reopen again, Target is benefiting from the connections it made with consumers and able to compete effectively against Walmart and even Amazon.com.

Second-quarter revenue surged 25% higher to $22.7 billion, on a massive 24% jump in comps generating an 84% spike in profits, to $3.32 per share.

Importantly, physical store comps were up 10.9% year over year as the number of transactions rose 4.6%, and digital comps nearly tripled, representing over 13 percentage points of Target's total comps gain. That's notable because while Walmart's digital sales doubled, its transactions collapsed 14% from last year.