Created
July 26, 2012 01:41
-
-
Save sinairv/3179773 to your computer and use it in GitHub Desktop.
Finding all columns of type uniqueidentifier in all tables
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.TABLE_NAME, C.COLUMN_NAME FROM | |
INFORMATION_SCHEMA.COLUMNS C | |
INNER JOIN INFORMATION_SCHEMA.TABLES T ON C.TABLE_NAME = T.TABLE_NAME AND T.TABLE_TYPE = 'BASE TABLE' | |
WHERE C.DATA_TYPE = 'uniqueidentifier' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment