Single-particle resonances in the continuum are crucial for studies of exotic nuclei. In this study, the Greens function approach is employed to search for single-particle resonances based on the relativistic-mean-field model. Taking $^{120}$Sn as an example, we identify single-particle resonances and determine the energies and widths directly by probing the extrema of the Greens functions. In contrast to the results found by exploring for the extremum of the density of states proposed in our recent study [Chin. Phys. C, 44:084105 (2020)], which has proven to be very successful, the same resonances as well as very close energies and widths are obtained. By comparing the Greens functions plotted in different coordinate space sizes, we also found that the results very slightly depend on the space size. These findings demonstrate that the approach by exploring for the extremum of the Greens function is also very reliable and effective for identifying resonant states, regardless of whether they are wide or narrow.