I don't necessarily know if everyone can give those expectations during the hiring process. Personally, I'm going to leave a company as soon as I see a good reason to do so. In other words, I can't give a potential future boss a clear picture of how long I will work there because I don't know myself.
In other words, this advice might work out if you're the kind of person who will think "I want to work for this job for about x months/years and then move on to something else". But not everyone thinks that way.
Regardless, +1 for being clear about your intentions up front. You can't go wrong that way (for most jobs).
I absolutely agree with that, Jason. But I think rather then saying "I want to be with this company x years," possibly say "At some point, I want to move from x to a management position" or "I want to get a graduate degree in 3 to 4 years." This kind of transparency can encourage incentives to keep you around: Partial or complete tuition reimbursement if you take night classes, for example.
Again, not always feasible if you don't know what you want yet or if you're in the wrong environment, but a good strategy when it works </tautology>
There are some other industries (big time consulting, for example) where transience is expected and encouraged, and it's a fair question to ask about that type of commitment up front. Particularly if you're up front about your intentions or expectations during the hiring process, people will be more willing to be understanding when you want to move on, and those recommendations, suggestions and connections can come in handy.