Can't get on the specifics as it varies country to country and even local regulations but as anecdotal evidence, I'm currently looking at a property in my hometown, with a mortgage of 80k€ (cost of mortgage 7k€, 10 years). This property would rent at 4000€/y, resulting in a yearly loss of roughly 4000€ (you read that right).
With local incentives and tax shelters, I would still net 18k€ in gain over 10 years. On a 80k€ property, that's a 21% ROI....