Last active
December 15, 2015 00:09
-
-
Save dannylloyd/5170575 to your computer and use it in GitHub Desktop.
Gets column name, type, and nullable from table definition
This file contains hidden or 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
| DECLARE @tableName varchar(50); | |
| SET @tableName = ''; | |
| SELECT | |
| COLUMN_NAME, | |
| DATA_TYPE, | |
| IS_NULLABLE | |
| FROM INFORMATION_SCHEMA.COLUMNS | |
| WHERE TABLE_NAME = @tableName |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment