Thanks for asking your question on Just Answer. I will make an assumption that you are planning on leaving your dog inside for a period of time. In general, a dog can hold their urine for 8 hours, depending upon their water intake. If you think about it, dogs can hold urine for about as long as we can. It's not healthy for dogs to hold urine for excessive periods of time on a regular basis. I've seen dogs who can hold their urine for longer -- even up to 18 hours. But, it is important to empty body waste so that in addition to relieving discomfort, we decrease the chance of infection.
Please let me know if you need more information or if I can help further.