STAMFORD, CONN., JULY 22 -- What a show for TV: A black mayor accused of sounding like a white bigot. A welfare mother of 14 children facing an upscale studio audience. A fact-touting Harvard sociologist and a prowling celebrity talk show host.

Mayor Marion Barry was at the center of it all, gamely holding his own and trying to focus all the talk on government policy as Phil Donahue taped a show on a volatile subject: welfare.

The tone was set early.

"As the mayor, you tell me which one of my kids I should have killed," demanded Jacqueline Williams, with 12 of her 14 children sitting nearby.

Williams and her family have been caught up in the media whirl since April when Barry, at a news conference, made several remarks that some considered insensitive to poor people who use city services.

Without naming Williams, Barry cited her as an example, recalling that he had asked her, "Why don't you stop having all these babies?"

Barry's remarks -- he has apologized for their tone, but not their substance -- helped spark new debates about the ability of city government to deal with urban poverty.

Barry said today he wasn't talking about Williams' family personally, but about his fear that a permanent underclass is developing.

He said the country needs government programs that help people out of poverty.

Aides to Donahue said the uproar prompted the hour-long show, which is scheduled to air in Washington on WUSA (Channel 9) at 12:30 p.m. Thursday unless preempted by the Iran-contra hearings.

The show will be seen in other parts of the country on Monday.

At one point, Donahue said Barry's remarks in April encouraged the "Archie Bunkers" of the nation and would "get a standing ovation from the all-white Rotary Club."

"I'd get an standing ovation from the all-black Rotary Club, too," Barry shot back, as the audience applauded.

Barry said welfare is not a racial issue but a class issue in which middle- and upper-income people are critical of spending for the poor because of stereotypes that poor people don't want to help themselves.

Even Williams had some kind words for Barry, whose administration helped find her a private home that may be ready next week.

"I'd like for someone to give me a house," snapped one member of the audience near the end of the program. "I had to pay for mine."

Donahue, moving in, suggested the mayor had "popped off a little bit too fast" and went to a videotape of the news conference in which Barry had talked about Williams. The mayor stood his ground.

The audience went further, reacting angrily when Williams said she might have 14 more children.

"She is not typical of welfare" recipients, Barry tried to interject.

He and Harvard sociologist Mary Jo Bane pointed out that most welfare recipients have fewer than three children, are white, want to get off assistance and work.

Having babies to get welfare "is no get-rich-quick scheme," Bane said.

After the program, Barry said he felt that he had gotten across his basic message that government programs should encourage self-help.

He kissed Williams and chatted with her children.

Donahue, who had not met Barry until today, seemed to sympathize with Barry's emphasis on policy, but suggested it would have been better if the mayor had apologized for his initial remarks.

"Apology is a decent thing for brave men to do," he said.

The Williams family, rejecting offers of airline tickets, traveled to New York Tuesday by train and stayed at the Drake Hotel as guests of the Donahue show.

The family was scheduled to return to Washington by train tonight.

Barry, accompanied by a security aide, press secretary John C. White and special assistant Audrey Rowe, took the Eastern Shuttle to New York today and planned to return to Washington Thursday.

The Donahue show is usually taped in New York, but a strike by technicians against NBC led the independent company to move to public television studios here temporarily.