Created
April 24, 2026 23:32
-
-
Save karenpayneoregon/63b565685d7800b1cecc7c43333ec5ff to your computer and use it in GitHub Desktop.
For SQL Server get computed column names and definitions
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
| SELECT SCHEMA_NAME(o.schema_id) AS schema_name, | |
| c.name AS column_name, | |
| OBJECT_NAME(c.object_id) AS table_name, | |
| TYPE_NAME(c.user_type_id) AS data_type, | |
| c.definition | |
| FROM sys.computed_columns c | |
| JOIN sys.objects o | |
| ON o.object_id = c.object_id | |
| ORDER BY schema_name, | |
| table_name, | |
| c.column_id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment