I'm trying to create a table that has some merged columns. But after I compile the file, the borders for those merged cells doesn't appear. I don't know how can I fix this. Any suggestions?!
Here is the code :
\begin{table}[h]
\centering
\caption{Query Q1}
\begin{tabular}{|c|c|c|c|}
\hline
\multicolumn{4}\textbf{Search Results} \\
\hline
1 & D7 & R & \\
2 & D2 & R & \\
3 & D3 & NR & \\
4 & D5 & R & \\
5 & D1 & R & \\
6 & D6 & NR & \\
7 & D12 & R & \\
8 & D15 & NR & \\
9 & D21 & NR & \\
10 & D9 & R & \\
\hline
\multicolumn{3}\textbf{Avg} & \\
\hline
\end{tabular}
\end{table}

\multicolumn. Your sentence "be careful with multicolumnsounds as if\multicolumn` would be buggy, which it is not. You should explain, why there were no lines in the multicolumned row. I'd also suggest, removing the vertical and horizontal lines, using only the booktabs line. – Jan Jan 11 '17 at 09:50\multicolumncommand works perfectly when it is used with the correct syntax. That's what I meant. Concerning the vertical and horizontal lines, I took them from the original post. – Jérôme Dequeker Jan 11 '17 at 09:55