Skip to content

Instantly share code, notes, and snippets.

@zoozalp
Created January 13, 2018 09:54
Show Gist options
  • Save zoozalp/bcfb977f82f0a6d6cdc972af675253a3 to your computer and use it in GitHub Desktop.
Save zoozalp/bcfb977f82f0a6d6cdc972af675253a3 to your computer and use it in GitHub Desktop.
Find tables and fields in sql server database
SELECT
t.name AS 'Table',
c.name AS 'Column'
FROM sys.columns c
JOIN sys.tables t ON c.object_id = t.object_id
WHERE lower(t.name) LIKE '%fis%'
OR lower(c.name) LIKE '%fis%'
ORDER BY 1,2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment