数据库中查询学校里有那些系用什么命令

职业培训 培训职业 2024-12-23
这个数据库类型紧密相关的数据库大多有自己的系统表来存放这些元数据举个sqlserver的例子select object_name(c.id) as 表名,c.name as 字段名,t.name 数据类型c.length 长度 ,c.prec as 精度,p.value as 字段说明,m.text as 默认值case when c.status=0x80 then 1 else 0 end

这个数据库类型紧密相关的

数据库大多有自己的系统表来存放这些元数据

举个sqlserver的例子

select object_name(c.id) as 表名

,c.name as 字段名

,t.name 数据类型

c.length 长度

,c.prec as 精度

,p.value as 字段说明

,m.text as 默认值

case when c.status=0x80 then 1 else 0 end 标识

c.iscomputed 是否已计算该列的标志

c.isnullable 是否允许空值

c.isoutparam 是否输出参数

from syscolumns c

inner join systypes t on c.xusertype=t.xusertype

left joinp on c.id=p.id and c.colid = p.smallid

left join syscomments m on c.cdefault=m.id

where(c.id,'IsUserTable')=1 and object_name(c.id)='dat_deptinfo'

标签

版权声明:本文由哟品培原创或收集发布,如需转载请注明出处。

本文链接:http://www.yopinpei.com/20241223/2/905903

猜你喜欢
其他标签