Created
April 30, 2009 19:53
-
-
Save benatkin/104645 to your computer and use it in GitHub Desktop.
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
-- List all nvarchar and varchar columns in SQL Server database | |
SELECT OBJECT_NAME(col.OBJECT_ID) as [TableName], col.[name] as [ColName], typ.[name] | |
FROM sys.all_columns col | |
INNER JOIN sys.objects obj | |
ON col.object_id = obj.object_id | |
INNER JOIN sys.types typ | |
ON col.user_type_id = typ.user_type_id | |
WHERE col.user_type_id IN (167,231) | |
AND obj.type = 'U' | |
ORDER BY name, TableName, ColName | |
GO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment