\documentclass{article}
\usepackage{rotating}
\begin{document}
\begin{sidewaystable}
\centering
\caption{Comparison}
\begin{tabular}{l*{6}{c}r}
\hline
Names & A & B & C & D \\
\hline
\hline
Jobs & A & B & C & D \\
\hline
Types & A & B & C & D \\
\hline
\end{tabular}
\end{sidewaystable}
\end{document}
https://tex.stackexchange.com/questions/370393/how-to-rotate-the-large-table-and-caption