Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jeremykdev/517dc9984807cadf98be35ecfdfb8cd5 to your computer and use it in GitHub Desktop.
Save jeremykdev/517dc9984807cadf98be35ecfdfb8cd5 to your computer and use it in GitHub Desktop.
Find Microsoft SQL Server database tables which include columns using depricated data types
-- see: https://msdn.microsoft.com/en-us/library/ms143729.aspx
SELECT
TABLE_SCHEMA
,TABLE_NAME
,COLUMN_NAME
,DATA_TYPE
FROM INFORMATION_SCHEMA.COLUMNS
WHERE DATA_TYPE IN (
'text'
, 'ntext'
, 'image'
)
ORDER BY TABLE_SCHEMA, TABLE_NAME, DATA_TYPE;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment