President Donald Trump's proposed wall along the U.S.-Mexico border is not immoral, but it would be ineffective and a waste of money, House Majority Leader Steny Hoyer contended on Friday.

The border wall is "not a question of morality," said the Maryland Democrat. "For me, it's a practical issue. Is it effective? Will it work? Is it the best thing we can do to secure the border? Most of the people I talk to, including on the border, don't think it is."

Hoyer joined CNBC's "Squawk Box" as the partial government shutdown entered its 21st day, now tying for the longest shutdown ever in U.S. history. Trump and Democrats, who now control the House, are in a stalemate over whether to fund the president's wall along the southern U.S. border.

Trump has demanded that any deal to end the shutdown must include funds toward the construction of the barrier, while Democrats have refused to allocate any money, arguing the wall would be ineffective, unnecessary and not within American values.

On Thursday, Trump teased the possibility of declaring a national emergency to build the border barrier without congressional approval, something Republican Sen. Marco Rubio warned on CNBC could create a dangerous precedent for future presidents.

Hoyer said Democrats are also concerned that Trump, if allowed funding for a wall, could use the threat of a government shutdown again in his term in order to reach his administration's other objectives.

"We have to stop using the shutdown of the people's government as a strategy to obtain our objectives," said Hoyer, who noted that both parties in Congress and the White House have used this method. The wall would be a "waste of money," he said, adding the stalemate also is holding federal workers "hostage."

Sen. Chuck Grassley, a veteran Republican from Iowa, told CNBC on Friday in a separate interview that he "doesn't understand why there can't be a compromise here" to end the shutdown.

Grassley, like Rubio, said on "Squawk Box" that Trump should not declare a national emergency over illegal immigration in order to bypass Congress to get his long-promised wall built. "I think it's a bad precedent. And it contravenes the power of the purse that comes from the elected representatives of the people," Grassley said.

"I believe you're going to find it in the courts almost immediately" if Trump moves on an emergency declaration, Grassley said, adding the quicker the Supreme Court could make a decision on the matter should it come to pass the better.

On Wednesday, Trump said he will "probably" declare a national emergency if a wall deal can't be worked out.