I'm working with SQL server, using Microsoft SQL Management Studio.

I'm writing quite some SQL queries, one after the other.
This causes a list of results, which are quite difficult to distinguish, as you can see (I have quite some tables, having Id as first column):

enter image description here

My queries look like this:

FROM Customer.[dbo].TableName

Is it possible to add a label to the SQL queries' results?
Something like:

enter image description here

If the labels equal the table name, that's ok too.

Does anybody know how to do this?
Thanks in advance

1 Answer 1


I am unaware of a way to add custom labels to result pane. You can add a column to the query to help identify

    SELECT 'label1',*
FROM Customer.[dbo].TableName
  • Thanks. It's a start, but it's quite ugly. Hopefully something better will come up :-)
    – Dominique
    Commented Apr 26, 2022 at 15:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.