Lie
intentionally false statement to a person or group made by another person or group who knows it is not wholly the truth
Is it okay to lie after taking an oath in a court of law?
In a court of law, lying under oath is considered perjury.  Perjury is considered a crime.
When you lie in court, what is that considered? Is #1 legal?