Goldfish are cold-blooded. Unless the water is pretty close to the 80s or 90s, it is very hard for them to digest it. That is especially so for fish most comfortable in the 60s, low 70s F. Fats of warm blooded animals are even harder for cold blooded animals to process.

Even if the goldfish were able to swallow and eventually pass the ham, it might foul the tank.

If you were serious about the idea, don't do it unless you like making massive water changes or buying new fish after cleaning out a mucky aquarium.

Your inept spelling of ham suggests that you are a troll and not as used to using English as your native tongue. Have a happy holidays anyway.