A serving soldier was paid more than £23,000 by the Sun to provide the newspaper with "tittle-tattle and gossip" about Princes William and Harry, a court has heard.
Former Sandhurst Colour Sergeant John Hardy is alleged to have been paid by the tabloid for information at the army base.
The information was said to have been handed over to the Sun's former royal editor Duncan Larcombe on 34 occasions while the princes were at the military academy for two years.
Elsewhere, the Sun's former chief reporter John Kay, 71, is accused of paying Ministry of Defence (MOD) official Bettina Jordan-Barber £100,000 for providing stories over an eight-year period.
Hardy, his wife Claire, Kay and Larcombe are all on trial accused of offences relating to corrupt payments to officials by journalists, along with the paper's former deputy editors Fergus Shanahan and Geoffrey Webster. All six defendants deny the charges.
Michael Parroy QC told the Old Bailey the stories the journalists allegedly paid for were of "marginal or non-existent" public interest and virtually all of them turned out to be "frankly banal".
Parroy told the jury the basis of the trial is "all about greed".
He added: "It is about public employees who were prepared, for money, to sell to the press stories which they had obtained in the course of their work.
"By this process they abused the trust placed in them by the public, you and I, to keep such private information private.
"Tittle-tattle and gossip about the royal princes, William and Harry, had a special value, as did titbits involving salacious or embarrassing conduct - 'splashes' as they called them - involving the revelation of such things as affairs between serving soldiers or their civilian counterparts; a 'love triangle'."
The trial continues.