Skip to content

Instantly share code, notes, and snippets.

@ajw0100
Created August 24, 2015 21:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajw0100/c770bdcedb38db92bcfa to your computer and use it in GitHub Desktop.
Save ajw0100/c770bdcedb38db92bcfa to your computer and use it in GitHub Desktop.
Documenting Your Microsoft SQL Server Data Warehouse
create table orders (
id int
)
go
declare @CurrentUser sysname
select @CurrentUser = user_name()
execute sp_addextendedproperty 'MS_Description',
'This table holds all customer orders!',
'user', @CurrentUser, 'table', 'orders'
go
select value
from fn_listextendedproperty (null, 'schema', default, 'table', 'orders', default, default);
go
┌───────────────────────────────────────┐
│ value |
├───────────────────────────────────────┤
│ This table holds all customer orders! │
└───────────────────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment