In a groupoid (resp. ordered groupoid) $G$, the non-empty intersection of the elements of a chain of prime ideals, is a prime ideal of $G$. As a consequence, each prime ideal of a groupoid (resp. ordered groupoid) $G$ containing a non-empty subset $K$ of $G$, contains a prime ideal $P^*$ of $S$ having the property: If $T$ is a prime ideal of $G$ such that $K\subseteq T\subseteq P^\ast$, then $T = P^\ast$. As a result, in a groupoid (resp. ordered groupoid) $G$ with zero, each prime ideal of $G$ contains a minimal prime ideal of $G$. Some further results on prime ideals of groupoids (resp. ordered groupoids) are also given.