Created
October 31, 2016 16:16
-
-
Save jonasgiehl/16fe66b1774e7cad8125e5b24056cfc0 to your computer and use it in GitHub Desktop.
Helps you to find tables and data structure infos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
o.Name 'Table Name', | |
c.name 'Column Name', | |
t.Name 'Data type', | |
c.max_length 'Max Length', | |
c.precision , | |
c.scale , | |
c.is_nullable | |
FROM sys.columns c | |
INNER JOIN sys.types t ON c.user_type_id = t.user_type_id | |
INNER JOIN sys.objects o ON c.object_id = o.object_id | |
WHERE o.type = 'U' AND o.Name LIKE 'JOB%' | |
ORDER BY o.Name ASC | |
-- Get columns and table names who table name start with 'JOB' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment