Skip to content

[Feature Request]: Color-Code Result Grid Columns by Source Table in JOIN Queries #22283

@rsrchmurthi-gmail-com

Description

@rsrchmurthi-gmail-com

Feature Description

Feature Request: Color-Code Result Grid Columns by Source Table in JOIN Queries

Repository: microsoft/vscode-mssql


Problem Statement

When executing a SQL query that JOINs multiple tables, the results grid displays all columns in a uniform style with no visual distinction between which columns belong to which source table. This makes it difficult to quickly scan and interpret results, especially when:

  • Multiple tables share similar column names
  • The result set contains 10+ columns from 3+ tables
  • Columns are not aliased with table prefixes

Proposed Solution

Automatically color-code (highlight) columns in the results grid based on their source table when a JOIN query is executed.

Example behavior:

  • Columns from Employees → light blue header
  • Columns from Departments → light green header
  • Columns from Salaries → light orange header

The color assignment could be:

  1. Automatic — assigned from a preset accessible palette, cycling through tables in JOIN order
  2. Theme-aware — respects VS Code light/dark/high-contrast themes
  3. Optional — togglable via a setting like mssql.resultGrid.colorizeByTable: true/false

Expected Behavior

SELECT e.EmployeeID, e.Name, d.DepartmentName, s.Salary
FROM Employees e
JOIN Departments d ON e.DepartmentID = d.DepartmentID
JOIN Salaries s ON e.EmployeeID = s.EmployeeID

Result grid columns EmployeeID, Name → colored with palette color #1
Result grid columns DepartmentName → colored with palette color #2
Result grid columns Salary → colored with palette color #3

Additional Ideas

  • Show a legend below/above the grid mapping color → table name
  • On hover of a column header, show a tooltip like Source: Employees (e)
  • Allow users to customize colors per table in settings

Why This Is Valuable

This is a common pain point when doing exploratory data analysis or debugging JOIN queries. Tools like Excel and some BI tools offer column grouping/coloring — bringing this to the mssql results grid would significantly improve readability and productivity for SQL developers.

Environment

  • Extension: ms-mssql.mssql
  • VS Code Version: -
  • OS: -

👍 If you agree this would be useful, please upvote this issue!

Problem and Motivation

When a JOIN returns 20–30+ columns, your eyes have to hunt to find which column belongs to which table. Color coding lets you instantly group them visually without reading every header name.

Related Area

  • Connection dialog (SQL Server | Azure browse/Fabric browse)
  • Query editor
  • Query results panel
  • Object Explorer
  • GitHub Copilot integration
  • Preview/Edit data
  • Table Designer
  • Schema Designer
  • Schema Compare
  • Local SQL Server Container provisioning
  • SQL database in Fabric provisioning
  • DACPAC/BACPAC export/import
  • SQL Database projects
  • Query Plan Visualizer
  • Other (please describe below)

If you selected "Other", please describe the area

No response

Confirmation

  • I have searched existing feature requests and couldn't find a match
  • I want to help implement this feature

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions