Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mukarramjavid/697af222f4343cf613164a8a54bec67f to your computer and use it in GitHub Desktop.
Save mukarramjavid/697af222f4343cf613164a8a54bec67f to your computer and use it in GitHub Desktop.
From this script you can able to wrap Column names of any table in double qoutes in SQL Sever
SELECT STRING_AGG(CONCAT('"',COLUMN_NAME,'"'),',') AS AsDoubleQoutesCols
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'[table_name]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment