You can certainly grow different veggies in the same barrel, no problem there.
How large is your barrel? You might grow 1 zucchini plant in a barrel; but you could grow quite a lot of lettuce and chard, maybe a few radishes, scallions (if you can still find onion sets) and a cucumber plant to trail over the edge.