When Adam Sandler was on “Saturday Night Live” in the ’90s, he carved out a niche singing goofball songs about subjects ranging from Hannukah to a very special lunch lady. When he returned to host the show for the very first time, he played to his strengths.

“I can’t believe I’m back here after so much time,” he said after taking the stage to enthusiastic applause. Sandler added that his return to Studio 8H had allowed him to reconnect with old friends and find new ones in the show’s cast and writers.

“It’s just great to be around their youthful energy,” Sandler said. “I was 23 years old when I started here. David Spade and Rob Schneider were 25. Norm Macdonald was maybe 60, I don’t know, I never asked him, I don’t think he knows.”

“I had some of the best years of my life here and actually I lost my virginity to a woman in this very studio. I don’t kiss and tell, but it was the church lady. She said I was special,” Sandler joked before giving a shout-out to his wife and kids.

“I always tell them how SNL was the greatest time of my life, and my daughter asked me ‘If it was the greatest time in your life, dad, why did you leave?’” Sandler said. “Well, honey, there’s a reason.”

A wistful piano tune began to play as Sandler took the microphone.

I was fired.

I was fired.

I was fired, so sad to tell.

Well, I never saw it coming.

I got fired from SNL.

Sandler, who has said he doesn’t really know why he was fired from the sketch comedy show, continued singing.

Between seasons, I heard a nasty rumor that I was getting the sack.

I tried to call Lorne Michaels, but he never called me back.

“I’m joking, I’m joking, he called me,” Sandler assured the audience, before picking up the song to speculate about the reasons he was canned.

I guess NBC had enough of crazy spoonhead

And the songs I sang on the news.

Maybe they were sick of Canteen Boy, but I think they just hate the Jews.

Sandler reminded us that he wasn’t the only cast member to get fired amid the show’s low ratings in 1995.

I was fired, not rehired, well it made me sad and blue.

I told my boy Chris Farley I got fired

and he said “Sandman, they fired my a-- too.”

Sandler remembered Farley with an impressive impersonation of the “Tommy Boy” star, who got a sweet tribute in Sandler’s well-reviewed Netflix special “100% Fresh.” (In lieu of a final sketch, Sandler performed a version of the song on SNL).

Then, Sandler announced that Chris Rock, another former SNL colleague, was there. And guess what? He was fired from SNL, too.

Rock took to the microphone to tell us what happened.

I got fired.

I was fired.

I was fired by NBC.

Then I went on “In Living Color.”

Three weeks later they took it off TV.

Pete Davidson took the stage next. “I was fired,” he sang, looking proud.

“No, no, Pete, you weren’t fired,” Sandler interrupted.

“I wasn’t? How is that even possible?” Davidson asked.

“I don’t know, but be patient ’cause it’s coming soon,” Sandler told him.

Well, it broke my heart to pieces

’Cause SNL was my home.

Where could I do my silly voices now?

I never felt so alone.

Of course, we know that Sandler — and his silly voices — did just fine. But he reminded us, just in case.

I was fired.

I was fired.

NBC said that I was done.

Then I made over 4 billion dollars at the box office.

So, I guess you could say I won.

Sandler ended his song in celebration of his long-awaited hosting gig.

So, I was fired.

But tonight I’m rehired.

And I’m the happiest man alive because it feels so good to be back with you here tonight where it all began for me

Right here, on “Saturday Night Live.”

Read more:

Adam Sandler is hosting SNL for the first time. Will he bring back Canteen Boy?