How deep does a raised bed on a patio have to be to grow veggies?

How deep does a raised bed on a patio have to be to grow veggies?