国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 開發 > 綜合 > 正文

查詢數據庫中,表結構的詳細信息

2024-07-21 02:11:26
字體:
來源:轉載
供稿:網友
select
 表名=case when a.colorder=1 then d.name else '' end,
 字段序號=a.colorder,
 字段名=a.name,
 標識=case when columnproperty( a.id,a.name,'isidentity')=1 then '√'else '' end,
 主鍵=case when exists(select 1 from sysobjects where xtype='pk' and name in (
  select name from sysindexes where indid in(
   select indid from sysindexkeys where id = a.id and colid=a.colid
  ))) then '√' else '' end,
 類型=b.name,
 占用字節數=a.length,
 長度=columnproperty(a.id,a.name,'precision'),
 小數位數=isnull(columnproperty(a.id,a.name,'scale'),0),
 允許空=case when a.isnullable=1 then '√'else '' end,
 默認值=isnull(e.text,''),
 字段說明=isnull(g.[value],'')
from syscolumns a
 left join systypes b on a.xtype=b.xusertype
 inner join sysobjects d on a.id=d.id  and d.xtype='u' and  d.name<>'dtproperties'
 left join syscomments e on a.cdefault=e.id
 left join sysproperties g on a.id=g.id and a.colid=g.smallid 
order by a.id,a.colorder
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 黄浦区| 高安市| 屯昌县| 岗巴县| 同江市| 察雅县| 四会市| 大安市| 宜兰市| 南平市| 丹东市| 新安县| 加查县| 大渡口区| 昂仁县| 黎平县| 金塔县| 垣曲县| 凌源市| 时尚| 师宗县| 沅江市| 舞阳县| 九江县| 蒙自县| 宿迁市| 壤塘县| 尉氏县| 清流县| 阳朔县| 盐池县| 乌拉特后旗| 漳平市| 黑河市| 永定县| 平遥县| 临泽县| 海盐县| 开江县| 江西省| 玉山县|