question

michelle avatar image
michelle asked

How to remove the column heading?

Does anyone know who to remove the column heading from an answer set?

Thanks in advance Michelle

query-resultsformatting
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

TimothyAWiseman avatar image TimothyAWiseman commented ·
Scot probably has the best answer to the question being asked directly, but can I ask why you want to do that? There may be better ways to achieve your actual goal if we know exactly what you are trying to do.
0 Likes 0 ·

1 Answer

·
Scot Hauder avatar image
Scot Hauder answered

Alias column names as a space. If you are copying the results from the grid and they are included, you can turn this off in SSMS Tools->Options->Query Results->SQL Server->Results to Grid and uncheck Include column headers when copying or saving results

SELECT t.Name [ ], t.DOB [ ], t.AgentID [ ], x.AgentName [ ] 
FROM Table12 t
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.