Old Testament readings use the Septuagint , the Scripture the apostles quoted. Masoretic numbering shown for reference.Learn why
WEB

Ecclesiastes 8:2

I say, “Keep the king’s command!” because of the oath to God.

Read in other translations