8. The number of five-digit numbers in which each digit appears at least twice is $\qquad$.

Each digit in the five-digit number appears at least twice.
8. 819 .

Five-digit numbers with all identical digits have 9;
If the digits do not contain 0, then this five-digit number is exactly composed of two digits from 1, $2, \cdots, 9$, and one of them appears 2 times, the other appears 3 times, totaling $\mathrm{A}_{9}^{2} \mathrm{C}_{5}^{2}=720$;

If the digits contain 0, then the five-digit numbers with 0 appearing 2 times have $\mathrm{C}_{9}^{1} \mathrm{C}_{4}^{2}=54$ in total, and the five-digit numbers with 0 appearing 3 times have $\mathrm{C}_{9}^{1} \mathrm{C}_{4}^{1}=36$ in total.
Therefore, the total number of five-digit numbers is 819.