Can you still upgrade when you have jailbroken?

When you have jailbroken an iPhone4 can you still upgrade to an iPhone 5? I have been thinking that I want to jailbreak but if you can't upgrade I guess I won't be doing it.

Sorry no, it will reset your whole phone and delete all data.

They don't care for your old phone unless your are trading it in against cost of new phone, if you are then simply reverse the jailbreak easily done before you hand it over.

If you're eligible for an upgrade then you can upgrade. The fact that your phone is jailbroken has no bearing on that.