The Nation's mayors here seem relieved at President Carter's call to fight inflation because, in effect, he told them he was going to be an equal-opportunity Scrooge.

That is, he told them that in his efforts to hold down inflation he would treat the hungry defense establishment with the same budget-cutting fervor he plans to use on urban areas.

As he razors through 1980 budget proposals, Carter said, "No aspect of government will be sacred or sacrosanct. All will be carefully assessed, including the drfense budget."

City officials had feared, as Mayor Lee Alexander of Syracuse said, that "we would be the victims." However, Carter promised them that "the cities will bear no more and no less than a fair share of budget restraint."

But another message was equally clear.

"We just found out our rich uncle wasn't so rich," said Mayor Max M. Heller of Greenville, S.C. "The bottom line is that we can be looking for a reduction in programs. Now we've got to come to grips with what our priorities really are.

In a way I think mayors will welcome the message. Now they can do things - tighten up, out waste - that they didn't have the political courage to do before."

Carter told some 3.250 delegates to the National League of Cities convention here that the new federal buget will be "very, very tight. . . . There will be little money for new initiatives." He predicted the budget "will disappoint those who expect constantly expanding number of new programs and agencies."

However, little disappointment has been voiced here. The mayors' emerging strategy seems to be one of trying to head off cuts in programs they consider essential.

McDawson L. Burton, assistant to Mayor Johnny Ford of Tuskeegee, Ala., said, "We won't be hurt with less federal money if they don't cut economic development funds. If they want to cut some social programs, okay. But we need money for things like water and sewer lines so we can attract industry and create jobs. If we have jobs and a tax base, then we can handle the social problems ourselves."

Mayor John P. Rousakis of Savannah, Ga., the new president of the league, noted that "the president said we've got to restructure existing programs and he's inviting us to tell him which ones should be cut. Also, we've got to clean our own houses locally. I'm personally delighted. We needed that."

However, some officials fear the cuts may go too deep. Nicholas R. Carbone, deputy mayor of Hartford, Conn., said, "We'll get hurt if programs directed toward the poor are eliminated." He cited welfare aid, assisted housing and the government's Comprehensive Employment and Training Act program, which provides 600,000 public service jobs.

"We've been in a budget crisis since 1972," Carbone said. "We've reduced our police and fire departments 20 percent. We've eliminated all maintenance work that we had been deferring. We're not fixing roads. We have nothing left to cut."

Yet no official here, including Carbone, is asking for more federal aid. As recently as last June at the U.S.Conference of Mayors convention in Atlanta, many mayors were still asking for federal increases.

But that was before they felt the full impact of California's tax-slashing Proposition 13, which had just been approved.

Now perhaps the most telling sign of the new times is Los Angeles Mayor Tom Bradley assuring Carter in a private session, which the President held with the league's leadership, that:

"We will work with you and we will be taking our fair share of the cuts. Is there any mechanism we can use to propose programs we think can be cut?"

Such a question would not have been asked six months ago. But aside from the galloping increase in inflation, another factor has changed the picture in federal-local relations: The realizations that the government is now sending an enormous amount of money to localities. it spends about $80 billion a year on states and localities.

A recent article in Harper's magazine noted that the amount is much more what some urban leaders once called for, a Marshall Plan for cities. The Marshall Plan provided $13 billion over five years - or $2.6 billion a year - to rebuild 17 European countries damaged by World War II. Even allowing for inflation, the cities are ahead.

So the cities of America, in large part, got what they wanted. And now the problem has shifted. Two years ago, Jimmy Carter running for president, told the nation's mayors, "America's No. 1 economic problem is our cities," On Monday he told them that "to conserve the greatness or our cities, we must also deal with our current No. 1 economic problem, and that is inflation."