--查询所有表及注释SELECTA.name ,C.valueFROM sys.tables A LEFT JOIN sys.extended_properties C ON C.major_id = A.object_idWHERE C.minor_id=0 group by A.name ,C.value ----查询表字段注释 SELECTA.name AS table_name,B.name AS column_name,C.value AS column_descriptionFROM…
xtype字段包含的值的意思如下: AF = Aggregate function (CLR) 聚合函数(CLR) C = CHECK constraint CHECK约束 D = Default or DEFAULT constraint 默认或DEFAULT约束 F = FOREIGN KEY constraint 外键约束 L = Log 日志 FN = Scalar function 标量函数 FS = Assembly (CLR) scalar-function 组装(CL…
create trigger TR_MasterTable_Updateon MasterTableafter updateas if update ([Type])--当Type字段被更新时,才会触发此触发器 insert into MasterLogTable select Id ,(Case [Type] when 1 then 'Type1' when 2 then 'Type2' when 3 then 'Type3' when 4 then 'Type4' …
SQL查询表,表的所有字段名 2011-07-29 10:21:43| 分类: SQLServer | 标签:表 sql 字段 |举报 |字号 订阅 SQL查询表,表的所有字段名 SQL SERVER 查看所有表名: select name from sysobjects where type='U' 查询表的所有字段名: Select name from syscolumns Where ID=OBJECT_ID('表名') select * from information_…