If you get caught lying under oath you could be charged with perjury and be made to serve 30 days in jail.
The jail time or sentence can vary from judge to judge but when I was in a courtroom and someone had been caught lying under oath the judge sentenced the person to 30 days in jail.
So they went directly from the courtroom to the jail and spent 30 days in jail for lying under oath and committing perjury.
Perjury or lying under oath is a serious offense and is a crime so never lie under oath.
Once you take the oath in court you must tell the truth and you will be caught lying if you are lying.