MS Sql新增描述資訊 及其他資訊

2022-01-13 19:43:37 字數 1797 閱讀 6241

--

查詢某個表的描述

select

*from fn_listextendedproperty (null, '

user

', '

dbo', '

table

', '

(表名)

',null, null)--

查詢所有表的描述資訊

select

*from fn_listextendedproperty (null, '

user

', '

dbo', '

table

', null,null, null)--

新增表的描述資訊

execute sp_addextendedproperty n'

ms_description

','(表描述名)

', n'

user

', n'

dbo', n'

table

', n'

(表名)

', null, null

--修改表的描述資訊

execute sp_updateextendedproperty n'

ms_description

','(表描述名)

', n'

user

', n'

dbo', n'

table

', n'

(表名)

', null, null

--查詢表的列的描述資訊

select

*from fn_listextendedproperty(null, '

user

', '

dbo', '

table

', '

(表名)

','column

', null)--

新增表的列的描述資訊

execute sp_addextendedproperty n'

ms_description

', '

(列描述名)

', n'

user

', n'

dbo', n'

table

', n'

(表名)

', n'

column

', n'

(列名)'--

修改表的列的描述資訊

execute sp_updateextendedproperty n'

ms_description

', '

(列描述名)

', n'

user

', n'

dbo', n'

table

', n'

(表名)

', n'

column

', n'

(列名)

'

檢視檢視資訊

select c.name as columnsname , t.name as columnstype from sysobjects as o , syscolumns as

c ,

systypes

ast

where o.type in ('

u','v'

) and o.id = c.id and c.xtype =

t.xtype

and o.name =

'v_userinfo

'

git給分支新增描述資訊

git給分支新增描述資訊 預設情況下 git branch 命令只會顯示本地擁有的分支,按照分支名列表展示,如下圖 給分支新增描述資訊 git config branch.分支名.description 描述資訊 檢視分支描述資訊 git config branch.分支名.description更...

mssql 系統資訊

儲存sql所有的系統資訊。儲存有關資料庫服務中的元資料所謂元資料即 比如資料伺服器有哪些使用者資料庫 資料庫伺服器有哪些登陸賬號,資料庫中都有哪些表,每個表都有哪些字段 每個資料庫有哪些儲存過程 檢視等等的資料 系統表一般sys開頭。任何使用者都不應直接更改系統表。例如,不要嘗試使用 delete ...

SQL Server 新增描述

新增描述的格式 exec sys.sp addextendedproperty name n ms description value value level0type n schema level0name n dbo level1type n table level1name process e...