In this paper we prove Liouville type theorems for the stationary solution to the Navier–Stokes equations in \(\mathbb {R}^3\) . Let (u, p) be a smooth stationary solution to the Navier–Stokes equations in \(\mathbb {R}^3\) , and \(Q=\frac{1}{2} |u|^2 +p\) is its head pressure, which vanishes near infinity. We assume \(\int _{\mathbb {R}^3} |\nabla u|^2 dx<+\infty ,\) and there exists \(\alpha >0 \) , \(C>0\) and \(R>0\) such that \( |Q(x)| \ge C \Vert Q\Vert _{L^\infty }|x|^{-\alpha }\) for all \(|x|>R\) . Suppose, furthermore, there exists \(\beta \) such that either \(|u(x)|=O( |x|^{-\beta })\) with \(\beta \ge \frac{\alpha }{2}\) or \(|\nabla Q(x)|=O( |x|^{-\beta })\) with \(\beta \ge 2\alpha \) respectively as \(|x|\rightarrow +\infty \) . Then, we show that u is zero or a constant respectively on \(\mathbb {R}^3\) .