The five different elastic constants of all the hexagonal 4d transition metals (Y, Zr, Tc, and Ru) and the 5d transition metals Re and Os have been calculated by means of first-principles electronic-structure calculations using the full-potential linear muffin-tin orbital method. The calculated data agree with the experimental values within \ensuremath{\sim}30%. We demonstrate, using experimental data, that the hexagonal transition metals obey the Cauchy relations much better than the cubic ones. This is due to the fact that the shape of the density of states for the hexagonal materials retains its form to a larger extent, for all types of shears, than it does for the cubic metals. We introduce normalized elastic constants ${\mathrm{C}}_{\mathrm{ij}}^{\ensuremath{'}}$=${\mathrm{C}}_{\mathrm{ij}}$/B, where B is the bulk modulus, which show a regular behavior for the hexagonal transition metals, in contrast to the cubic transition metals, where large irregularities are observed. These regular as well as irregular behaviors are well reproduced by the full-potential calculations.