Created
October 31, 2016 15:54
-
-
Save jonasgiehl/bf89a128a1bddef0241b7b0163512fee to your computer and use it in GitHub Desktop.
Helps you find the columns of a table and the data types
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 | |
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 | |
WHERE | |
c.object_id = OBJECT_ID('TABLE_NAME') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment