This is a hard question to give a simple answer to. It depends on the type of job you have, and in what field you work. Some jobs it is very bad to stay at for more than a few years, you are expected to have a held several positions with different companies so you have a broader range of experience.
But overall, I'd say yes.