Skip to content

Instantly share code, notes, and snippets.

@Elandlord
Created December 20, 2019 09:53
Show Gist options
  • Save Elandlord/fb3b734dd4422faad11e7f42a0655a65 to your computer and use it in GitHub Desktop.
Save Elandlord/fb3b734dd4422faad11e7f42a0655a65 to your computer and use it in GitHub Desktop.
Get the column names of a table with SQL
SELECT column_name
FROM information_schema.columns
WHERE table_name = 'table_name'
AND table_schema = 'database_name'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment