数码资讯
SQL根据表名获取字段和通信。
复制代码代码如下所示: 选择 表名= object_name(c.object_id), columnsname = c.name, 描述= ex.value, 塔式= t.name, 长度= c.max_length 从 sys.columns C 左外连接 sys.extended_proper
选购提示
关注价格、性能、续航、售后和真实使用场景,理性比较后再下单。
复制代码代码如下所示:
选择
表名= object_name(c.object_id),
columnsname = c.name,
描述= ex.value,
塔式= t.name,
长度= c.max_length
从
sys.columns C
左外连接
sys.extended_properties前
在
ex.major_id = c.object_id
和ex.minor_id = c.column_id
和ex.name = 'ms_description
左外连接
Systypes T
在c.system_type_id = t.xtype
哪里
客体(c.object_id,'ismsshipped)= 0
和object_name(c.object_id)= 'tablename
1。获取所有数据库名称:
选择名字中订购的名字..
2。获取所有表名:
从数据库中选择的名字..在xtype = 'u'order的名字
xtype = U:代表所有用户表;
xtype =:代表所有系统表;
三.获取所有字段名:
选择名称列的id是object_id('tablename)
选择
表名= object_name(c.object_id),
columnsname = c.name,
描述= ex.value,
塔式= t.name,
长度= c.max_length
从
sys.columns C
左外连接
sys.extended_properties前
在
ex.major_id = c.object_id
和ex.minor_id = c.column_id
和ex.name = 'ms_description
左外连接
Systypes T
在c.system_type_id = t.xtype
哪里
客体(c.object_id,'ismsshipped)= 0
和object_name(c.object_id)= 'tablename
1。获取所有数据库名称:
选择名字中订购的名字..
2。获取所有表名:
从数据库中选择的名字..在xtype = 'u'order的名字
xtype = U:代表所有用户表;
xtype =:代表所有系统表;
三.获取所有字段名:
选择名称列的id是object_id('tablename)
声明:本文内容用于数码产品信息整理与选购参考,具体价格、库存、售后政策以官方渠道和电商页面实时信息为准。