In modern Biblical scholarship, six different law codes are considered to compose the body of the Torah's text:
•The Ten Commandments.
•The Covenant Code follows, and provides more detailed laws.
•The Ritual Decalogue, roughly summarising the Covenant Code, is presented after a brief narrative describing the design for the Ark of the Covenant and Tabernacle.
•The Priestly Code, containing extensive laws concerning rituals and more general situations is given from above the mercy seat in the Tabernacle, once the Ark and Tabernacle have been completed. This code is extended further when events occur not quite covered by the law, causing Moses to ask Yahweh for greater clarification.
•The Holiness Code is contained within the Priestly Code, close to the end, but is a distinct subsection placing particular emphasis on things which are holy, and which should be done to honour the holy. It also contains the warnings from Yahweh about what will occur if the laws are not followed, as well as promises for the event that the laws are followed.
•The Deuteronomic Code is remembered by Moses, in his last speeches before death, both covering the ground of prior codes, but also further laws not recorded earlier, which Moses has, by this point, remembered.
As one can see, clearly, when Paul writes in his Epistles and Romans letters concerning the Law, it is the whole law in which he writes. The law contained in the ordinances of course were given first in Exodus 20:1 and continued throughout the Torah. When Paul builds his case in Romans concerning the Law, he was not just commenting on the ceremonial laws, rituals and rites but rather the Law in its totality. The condemnation or guilty verdict which was against us sprung from every violation of the Law. The Law not only reported where we were in error but alas, also the penalty which was mandated to be carried out was also contained therein.
There are not exceptions to the Ten Commandments. They were abolished under the New Covenant :
The following excerpts are from the Believer’s Bible Commentary by William MacDonald
Now we must pause in our discussion and consider a basic problem which arises. Are Christians under the law or are they not? We see in the Book of James Chapter Two, he seems to enforce the 10 Commandments on the Christians. He specifically refers to the 6th and 7th which forbid murder and adultery. Also he summarizes the last five commandments in the words: “You shall love your neighbor as yourself. Yet to put believers under the law, as a rule of life, contradicts other portions of the NT, such as Romans 6:14” You are not under law, but under Grace”; Romans 7:6 “We have been delivered from the law”; Romans 7:4 “You also have become dead to the law through the body of Christ” (see also Gal 2:19;3:13; 24,25; 1Tim 1:8, 9; Heb7:19.) The fact that Christians are not under the Ten Commandments is distinctly stated in 2 Corinthians 3:7-11
Why then does James press the matter of the law on believers in the Age of Grace? First of all, Christians are not under the law as a rule of life. Christ, not the law, is the believer’s pattern. Where there is law, there must also be penalty. The penalty of breaking the law is death. Christ died to pay the penalty of the broken law. Those who are in Christ are therefore delivered form the law and its penalty. But certain principles of the law are of abiding value.
Finally it should be mentioned that are repeated in the Epistles are not given as law but as instructions in righteousness (not only righteousness but victorious living) for the people of God. In other words God does not say to Christians, “If you steal, you are condemned to death.” Or “If you commit an immoral act, you will lose your salvation.” Rather He says: “I have saved you by My Grace”. Now I want you to live a holy life out of love to me. If you want to know what I expect of you, you will find it throughout the NT. There you will find nine of the 10 Commandments repeated. But you will also find the teachings of the Lord Jesus which actually call for a higher standard of conduct than the law required.”
Hope this helps