The sugar in DNA is 2-deoxyribose. It does not contain a hydroxyl group in the second carbon atom of the pentose ring.
The sugar in RNA is ribose sugar. It contains a hydroxyl group in the second carbon atom of the pentose ring.