Apple Inc. (Nasdaq:AAPL) has completed the largest corporate bond sale ever, a $17 billion offering that investors made a meal of.

The debt was sold on Tuesday for Apple by Goldman Sachs Group Inc. and Deutsche Bank AG to investors in virtually every corner of the credit markets, the Wall Street Journal reports.

A week after announcing its first drop in quarterly earnings in a decade, Apple came to market with the deal to raise funds for a program that will return $100 billion in cash to shareholders, according to Reuters.

Taking advantage of a sharp decline in Treasury interest rates, Apple borrowed the money in six chunks. The offering attracted more than $50 billion of orders by midday in New York, Reuters reports.

"Apple made its intentions clear that this deal is for shareholder-friendly activity, but they have tremendous metrics and brand recognition," Rajeev Sharma, portfolio manager at First Investors Management Co, told IFR. "Apple is something everyone wants in their portfolio."

It was Apple's first bond offer in nearly 20 years, the Journal reports. The $17 billion size tops the previous biggest single deal, according to Thomson Reuters/IFR data -- a $14.7 billion deal from Abbott Laboratories spin-off AbbVie in November 2012.