Sandoval, the Giants' first position player to make the All-Star team since Barry Bonds in 2007, entered the game defensively at third base in the sixth inning, replacing Scott Rolen of the Reds.
Sandoval, who officially replaced Mets shortstop Jose Reyes (sore left hamstring) on the roster, went 1-for-1, driving in the Astros' Hunter Pence from third base with a ground-rule double to left field off Seattle's Brandon League in the seventh inning for the NL's fifth run of the game.
"I was nervous the first couple of pitches but then I got a deep breath," Sandoval said of his first All-Star Game appearance. "I really wanted to drive in that guy."
Wilson, who was the Giants' lone All-Star elected by players, coaches and the managers, got the save by recording the final two outs of the ninth inning, thus securing home-field advantage for the NL in the World Series, something Wilson said helped the Giants on their way to winning the World Series a year ago.
"That's what everyone wants ... home-field advantage," he said.
Wilson had been perfect in two previous All-Star appearances. He retired both batters he faced in 2008 at Yankee Stadium before working a scoreless eighth inning a year ago in Anaheim.
In addition to being on the same All-Star team as his Giants teammates, Wilson relished the opportunity to play for his own manager, Bochy.
"This was a special experience for all of us," Wilson said. "It was exciting."
When Lincecum didn't pitch, it marked the third time in four All-Star Game appearances that he didn't throw a single pitch in the All-Star Game.
At least Lincecum had company in the dugout with Vogelsong and Cain.
Voegelsong, one of baseball's best feel-good stories in 2011 after reviving a career that seemed to dead-end and forced him to play in Japan for three seasons, knew that there was real possibility that he wouldn't pitch. Bochy had indicated Vogelsong would be held in reserve as a long man in case the game went into extra innings.
"It was a smart move. ... That's what those guys [relievers] do, close games," said Vogelsong of the decision to use relievers late in Tuesday's game instead of putting him in a role he's uncomfortable in.
Not pitching Tuesday didn't take the shine off Vogelsong's first All-Star Game experience.
"This has been amazing," he said. "I'm never going to forget this and being able to share your experiences with your [Giants] teammates was great."
As for Cain, he already found his mind wandering toward the second half of the season, which begins Thursday with the first of four games in San Diego against the Padres.
The Giants, in their bid to win the NL West for the second time in as many years, enter the second half of the season with a three-game lead over the D-backs. It's a lead that Cain considers tenuous at best, given the nature of the division.
"I expect it's going to be like it's been in years past. ... It's going to be close where you can't count anyone out." Cain said. "Look at last year -- a lot of teams thought that they were out of it but they weren't.
"It was pretty cool to have it come down to the end."
A year ago, the Giants defeated the Padres in the final game of the regular season for the division title. The Giants then went on to beat the Braves and Phillies before defeating the Rangers in the World Series.