List of column names of SQL SERVER table with variable

Hello, I’m a new user of grafana.

After various searches I cannot find an solution to show, through the creation of a variable, the list with the names of the columns of a SQL Server table.

I tried various methods find on forum , but none of them worked.

SELECT * FROM myTable WHERE 1=0
SELECT TOP 0 * FROM myTable WHERE 1=0
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = ‘table_name’

I’m using Grafana v 11.4

Thank’s for your support.

SELECT * FROM myTable WHERE 1=0 will never return a row
SELECT TOP 0 * FROM myTable WHERE 1=0 will never return a row

SELECT COLUMN_NAME 
   FROM INFORMATION_SCHEMA.COLUMNS 
WHERE TABLE_NAME = '${table_name}'

should return rows if you have a variable name table_name