We consider the prescribing scalar curvature equation
\begin{equation}
-\lap u + \frac{n(n-2)}{4} u = \frac{n-2}{4(n-1)} R(x)u^{
\frac{n+2}{n-2}}
\label{eq0}
\end{equation}
on $S^n$ for $n \geq 3$.
In the case R is rotationally symmetric, the well-known Kazdan-Warner
condition implies that a necessary condition for (1) to have a
solution is:
$R > 0$ somewhere and $R'(r)$ changes signs.
Then,
(a) is this a sufficient condition?
(b) If not, what are the necessary and sufficient conditions?
These have been open problems for decades.
In Chen \& Li, 1995,
we gave question (a) a negative answer. We
showed that a necessary condition for (1)
to have a solution is:
\begin{equation}
\mbox{ $R'(r)$ changes signs in the region {\em where $R$ is
positive.} }
\label{01}
\end{equation}
Now is this also a sufficient condition? In this paper, we prove that
if $R(r)$ satisfies the `flatness condition', then (2) is the
necessary and sufficient condition for (1) to have a solution.
This essentially answers question (b). We also generalized this result
to non-symmetric functions R. Here the additional `flatness condition'
is a standard assumption which has been used by many authors to
guarantee the existence of a solution. In particular, for $n=3$,
`non-degenerate' functions satisfy this condition.
Based on Theorem 3 in Chen \& Li, 1995,
we also show that for some
rotationally symmetric R, (1) is solvable while none of the
solutions is rotationally symmetric. This is interesting in the
studying of symmetry breaking.