Its honestly up to the manufacturer and their warranty policy. The typical warranty policy is non-transferable, meaning if you bought it second hand it doesnt matter if the terms still had ten years left, they won't honor it because you're not the original purchaser and presumably anything could have been done to the merchandise to void the warranty at that point. However, some companies let you transfer the warranty, some need proof of purchase for a claim and some dont, etc.
If there's a particular brand you're looking for, best advice is to reach out to their customer support department and ask. Some companies even list the full terms on their product websites.