自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

SQL Server 數(shù)據(jù)表信息的詳細描述

數(shù)據(jù)庫 SQL Server
我們今天是要和大家一起討論的是據(jù)庫手邊系列之SQL Server數(shù)據(jù)表信息,我們首先是從 SELECT開始對其進行介紹的。

下面的文章主要介紹的是據(jù)庫手邊系列之SQL Server數(shù)據(jù)表信息,你如果對其有興趣的話你就可以點擊以下的文章進行觀看了,以下就是文章的主要內(nèi)容的詳細描述,望大家在瀏覽之后會對其有更深的了解。

SELECT

表名=case when a.colorder=1 then d.name else '' end,

表說明=case when a.colorder=1 then isnull(f.value,'') else '' end,

字段序號=a.colorder,

字段名=a.name,

標識=case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end,

 

  1. 主鍵=case when exists(SELECT 1 FROM sysobjects where xtype='PK' and name in (  
  2. SELECT name FROM sysindexes WHERE indid in(  
  3. SELECT indid FROM sysindexkeys WHERE id = a.id AND colid=a.colid  
  4. ))) then '√' else '' end,  

 

類型=b.name,

占用字節(jié)數(shù)=a.length,

長度=COLUMNPROPERTY(a.id,a.name,'PRECISION'),

小數(shù)位數(shù)=isnull(COLUMNPROPERTY(a.id,a.name,'Scale'),0),

允許空=case when a.isnullable=1 then '√'else '' end,

默認值=isnull(e.text,''),

字段說明=isnull(g.[value],'')

  1. FROM syscolumns a  
  2. left join systypes b on a.xtype=b.xusertype  
  3. inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties'  
  4. left join syscomments e on a.cdefault=e.id  
  5. left join sysproperties g on a.id=g.id and a.colid=g.smallid  
  6. left join sysproperties f on d.id=f.id and f.smallid=0 

where d.name='要查詢的表' --如果只查詢指定表,加上此條件

  1. order by a.id,a.colorder 

 

以上的相關(guān)內(nèi)容就是對SQL Server數(shù)據(jù)表信息的介紹,望你能有所收獲。 

【編輯推薦】

  1. SQL Server加密的實際操作步驟
  2. SQL Server 2000 數(shù)據(jù)倉庫中使用分區(qū)之分區(qū)設(shè)計
  3. SQL Server 2000 安裝時的一些癥狀歸納
  4. SQL Server數(shù)據(jù)庫與EXCEL數(shù)據(jù)導入與導出
  5. SQL Server 數(shù)據(jù)庫與ACCESS數(shù)據(jù)的導入與導出
責任編輯:佚名 來源: 賽迪網(wǎng)
相關(guān)推薦

2009-09-08 11:09:39

LINQ數(shù)據(jù)源

2009-09-14 13:14:49

LINQ序列

2009-09-14 14:58:52

LINQ to XML

2009-09-14 16:33:55

LINQ To XML

2009-09-24 16:19:53

Hibernate應(yīng)用

2009-09-25 14:28:40

Hibernate S

2010-04-09 17:45:06

Oracle索引

2010-09-28 14:07:18

2009-10-10 10:04:50

RHEL合法使用

2009-11-18 11:14:49

2010-02-05 16:58:18

Android服務(wù)

2009-11-05 13:17:32

Visual Stud

2010-09-08 15:10:48

2009-08-10 16:40:03

C#索引器

2009-09-25 11:04:32

Hibernate3實

2009-10-15 14:59:45

網(wǎng)絡(luò)布線光纖技術(shù)

2009-08-26 15:53:48

C#擴展方法

2009-08-27 15:17:40

C# const變量

2009-09-07 15:15:43

2010-06-23 14:40:57

點贊
收藏

51CTO技術(shù)棧公眾號