The Code of Hammurabi is a Babylonian code of law of ancient Mesopotamia, dating back to about 1754 BC. The sixth Babylonian king, Hammurabi, enacted the code.
The code consists of 282 laws, with scaled punishments, adjusting "an eye for an eye, a tooth for a tooth" as graded depending on social status of slave versus free men or women.
The code is carved into a basalt stele in the shape of a huge index finger about Seven feet tall. The code is inscribed in the Akkadian language, using cuneiform script carved into the steele.
Half of the code deals with matters of contract, establishing the wages to be paid from an ox driver a surgeon. Other provisions set the terms of a transaction, establishing the liability of a builder for a house that collapses or property that is damaged while left in the care of another. A third of the code addresses issues concerning household and family relationships such as inheritance, divorce, paternity, and sexual behavior.
There is one provision that imposes obligations on an official; this provision establishes that a judge who reaches an incorrect decision is to be fined and removed from the bench permanently. A few discuss issues related to military service.
The Code of Hammurabi is the longest surviving text from the Old Babylonian period. The reason it is not recognized as a law or commandment as the question asked, is if you read the code, its original purpose is the self-glorification of Hammurabi rather than a modern legal code or constitution. However, its copying in subsequent generations attempted to us the code as a model of legal and judicial reasoning.
There is an argument that the code was trying to achieve equality, but huge biases still existed towards those categorized in the lower end of the social spectrum and some of the punishments and justice could be gruesome.
The magnitude of criminal penalties often was based on the identity and gender of both the person committing the crime and the victim. The Code issues justice following the three classes of Babylonian society: property owners, freed men, and slaves. Punishments for someone assaulting someone from a lower class were far lighter than if they had assaulted someone of equal or higher status.
For example, if a doctor killed a rich patient, he would have his hands cut off, but if he killed a slave, only financial restitution was required.
Women could also receive punishments that their male counterparts would not, as men were permitted to have affairs with their servants and slaves, whereas married women would be harshly punished for committing adultery.
This code sets up cultural, financial, gender and other biases that are in contradiction of an evolving society. The standard of the code permeates society in many ways and has been the basis for all forms of prejudice and atrocities against those of lesser stature. The code does not predate Abraham, who was a contemporary of Hammurabi, the king of the First Dynasty of Babylon around 2112–2004 BC which means the code of Hammurabi would borrow from the Abrahamic oral history period and were not original thoughts but demarcations of what became biblical principles.
About 300 years after Hammurabi the 6th, in 1440 B.C., Moses recorded the Law for the Israelites. Moses was the author of the first five books of the Bible, there are differences between Mosaic Law and the Hammurabian Code are significant.
The Law of Moses went far beyond the Code of Hammurabi in that it was rooted in the worship of one God, supreme over all (Deuteronomy 6:4-5). The moral principles of the Old Testament are based on a righteous God who demanded that mankind, created in His image, live righteously.
The Law of Moses is more than a legal code; it speaks of sin and responsibility to God. The Hammurabian Code and other ancient laws do not do this.
The Code of Hammurabi focused exclusively on criminal and civil laws and meted out harsh, and sometimes brutal, punishments. In this way, Hammurabi has more in common with Draco than with Moses.
The Law of Moses provided justice, but it also dealt with spiritual laws and personal and national holiness. As a result, the Mosaic Law dealt with the cause of crime, not just its effects. The Mosaic Law elevates the value of human life, and its whole tenor is more compassionate than that of the Hammurabian Code. The spiritual dimension is what makes the Law of Moses unique.
The Mesopotamians believed the god Shamash gave Hammurabi his law code so people could get along with one another. In the Bible, the law code was given primarily so people could get along with God.”
This is what sets the Mosaic Law apart from all the other law codes of antiquity: its strong emphasis on spiritual matters. The closest the Hammurabian Code comes to effect such spirituality is its proclamation that those who stole from the gods would be put to death. Unlike the Mosaic Law, Hammurabi’s Code had no provision for forgiveness.