To the fine answer of Abu Munir Ibn Ibrahim – which I’m agree with - I wish to add only some enriching (I hope) information I’ve found in some classic commentaries (bold is mine).
Treasury of Scriptural Knowledge:
“and put them*: **Rather, as the particle ב frequently signifies, ‘And he put them to saws, and to harrows, and to axes,’ etc., as we say, to put a person to the plough, to the anvil, to the last, etc. 1Ch 20:3, Also, 2Sa 8:2; Psa 21:8-9; Amo 1:3*.”
Joseph Benson’s Commentary on the Old and New Testaments:
“The Hebrew, וישׂם במגרה, vajasem bammegeerah, &c., may be literally and properly rendered, ‘and he put them to the saw, and to iron harrows, or mines, and to axes of iron, and made them pass by, or to, the brick-kilns’; that is, he made them slaves, and put them to the most servile employments, namely, sawing, harrowing, or making iron harrows, or mining, hewing of wood, and making brick. […] The Syriac and Arabic versions render the passage, ‘He brought them out, and threw them into chains, and iron shackles, and made them pass before him in a proper measure, or by companies at a time’. If the parallel place, 1Ch 20:3, which our version renders, ‘He cut them with saws, and with harrows of iron, and with axes’, be objected, it must be observed, the Hebrew,וישׂר, vajasser, may be rendered, He separated to the saw, &c.; or, He ruled or governed by the saw, harrows, mines, and axes; made them slaves, and condemned them to these servile employments. Thus the words are rendered by Schmidius.
And ‘this interpretation’, says Dr. Dodd, ‘is far from being forced, is agreeable to the proper sense and construction of the words, and will vindicate David from any inhumanity that can be charged upon the man after God’s own heart.
The Syriac version is, ‘He bound them with iron chains, &c.’; and thus he bound them all. And the Arabic, ‘He bound them all with chains, killing none of the Ammonites’. This interpretation may be further confirmed by the next clause: ‘Thus did he unto all the children of Ammon’ — For had he destroyed all the inhabitants by these, or any methods of severity, it would have been an almost total extirpation of them; and yet we read of them as united with the Moabites, and the inhabitants of Seir, and forming a very large army to invade the dominions of Jehoshaphat. […].”
E. W. Bullinger, The Companion Bible:
“under = with, especially to work with. Hebrew letter (Beth), prefixed as preposition = ‘in’, ‘within’, ‘with’. When the preposition ‘under ‘ = ‘beneath’, then it is either part of a verb or one of four distinct words: ’el (2 Samaritan Pentateuch 2Sa 2:23); mattah (1Ch 27:23); tehoth’ (Jer. 2Sa 10:11. Dan 4:12, Dan 4:21; Dan 7:27, ‘under the heavens’); tahath (Dan 4:14, ‘under a tree’). Beth, when translated ‘under’, is only in the sense of within (as ‘under [or within the shelter of] the wing’, or ‘under [or within] the earth’). Otherwise, used with a tool or weapon or instrument, it always means ‘with’. See ‘with an axe’ (Deu 19:5; Jer 10:3); ‘with axes’ (Jer’46:22; Eze 26:9; Psa 74:6); ‘with nails and with hammers’ (Jer 10:4); ‘with an ox-goad’ (Jdg 3:31); ‘with mattock’ (Isa 7:25; ‘with sword and with bow’ (Gen 48:22; Jos 24:12; 2Ki 6:22); ‘with a graving tool’ (Exo32:4), &c.”
Adam Clarke’s Commentary on the Bible:
“’He brought forth the people - And put them under saws’. From this representation a great cry has been raised against ‘David’s unparalleled, if not diabolic, cruelty’. I believe this interpretation was chiefly taken from the parallel place, 1Ch 20:3, where it is said, he cut them with saws, and with axes, etc. Instead of וישר vaiyasar, he sawed, we have here (in Samuel) וישם vaiyasem, he put them; and these two words differ from each other only in a part of a single letter, ר resh for ם mem. And it is worthy of remark, that instead of וישר vaiyasar, ‘he sawed’, in 1Ch 20:3, six or seven MSS. collated by Dr. Kennicott have וישם vaiyasem, ‘he put them’; nor is there found any various reading in all the MSS yet collated for the text in this chapter, that favors the common reading in Chronicles. The meaning therefore is, ‘He made the people slaves, and employed them in sawing, making iron harrows, or mining, (for the word means both), and in hewing of wood, and making of brick’. Sawing asunder, hacking, chopping, and hewing human beings, have no place in this text, no more than they had in David’s conduct towards the Ammonites.”
Finally, now I mention only some Bible translations that confirm the abovementioned Commentaries’ conclusions:
“He removed the people who were in it and made them labor with saws, iron picks, and iron axes, putting them to work at the brick kiln. This was his policy with all the Ammonite cities.”
Bible in Basic English (BBE):
“And he took the people out of the town and put them to work with wood-cutting instruments, and iron grain-crushers, and iron axes, and at brick-making: this he did to all the towns of the children of Ammon.”
Contemporary English Version (CEV):
David made the people of Rabbah tear down the city walls with iron picks and axes, and then he put them to work making bricks. He did the same thing with all the other Ammonite cities.
English Standard Version:
“And he brought out the people who were in it and set them to labor with saws and iron picks and iron axes and made them toil at the brick kilns. And thus he did to all the cities of the Ammonites.“
Good News Bible (GNB):
“And put its people to work with saws, iron hoes, and iron axes, and forced them to work at making bricks. He did the same to the people of all the other towns of Ammon.”
International Standard Version (ISV):
brought back the people who had lived in it, placing them under conscripted labor with saws, iron picks, and axes. He did this to every Ammonite city,
Lexham English Bible:
He also brought out the people who were in it and put them to the saws and to the iron picks and to the iron axes, and he sent them to the place of the brickmakers. Thus he used to do to all the cities of the Ammonites,
Tree of Life Version:
Then he brought out the people who were there and put them to work under saws, iron threshing boards and iron axes, and assigned them to brick making; and thus he did to all the cities of the children of Ammon.
“And the people who were in it he brought out and set them to work with saws and iron threshing boards and iron axes and he put them to the brick mold.” Related footnote says: “[…] the most plausible reading is that David impressed the male Ammonites into corvée labor.”
New Jerusalem Bible:
“And he expelled its inhabitants, setting them to work with saws, iron picks and iron axes, employing them at brickmaking.”
New American Bible:
“and also led away the inhabitants, whom he assigned to work with saws, iron picks, and iron axes, or put to work at the brickmold.”