收藏几段SQL语句和存储过程
来源:互联网 发布:linux安装控制面板 编辑:程序博客网 时间:2024/05/17 06:32
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
收藏几段SQL Server语句和存储过程
--======================================================
--列出SQLSERVER所有表,字段名,主键,类型,长度,小数位数等信息
--在查询分析器里运行即可,可以生成一个表,导出到EXCEL中
--======================================================
SELECT
(casewhena.colorder=1thend.nameelse''end)表名,
a.colorder字段序号,
a.name字段名,
(casewhenCOLUMNPROPERTY(a.id,a.name,'IsIdentity')=1then'√'else''end)标识,
(casewhen(SELECTcount(*)
FROMsysobjects
WHERE(namein
(SELECTname
FROMsysindexes
WHERE(id=a.id)AND(indidin
(SELECTindid
FROMsysindexkeys
WHERE(id=a.id)AND(colidin
(SELECTcolid
FROMsyscolumns
WHERE(id=a.id)AND(name=a.name)))))))AND
(xtype='PK'))>0then'√'else''end)主键,
b.name类型,
a.length占用字节数,
COLUMNPROPERTY(a.id,a.name,'PRECISION')as长度,
isnull(COLUMNPROPERTY(a.id,a.name,'Scale'),0)as小数位数,
(casewhena.isnullable=1then'√'else''end)允许空,
isnull(e.text,'')默认值,
isnull(g.[value],'')AS字段说明 共6页 第1页
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
收藏几段SQL Server语句和存储过程
--======================================================
--列出SQLSERVER所有表,字段名,主键,类型,长度,小数位数等信息
--在查询分析器里运行即可,可以生成一个表,导出到EXCEL中
--======================================================
SELECT
(casewhena.colorder=1thend.nameelse''end)表名,
a.colorder字段序号,
a.name字段名,
(casewhenCOLUMNPROPERTY(a.id,a.name,'IsIdentity')=1then'√'else''end)标识,
(casewhen(SELECTcount(*)
FROMsysobjects
WHERE(namein
(SELECTname
FROMsysindexes
WHERE(id=a.id)AND(indidin
(SELECTindid
FROMsysindexkeys
WHERE(id=a.id)AND(colidin
(SELECTcolid
FROMsyscolumns
WHERE(id=a.id)AND(name=a.name)))))))AND
(xtype='PK'))>0then'√'else''end)主键,
b.name类型,
a.length占用字节数,
COLUMNPROPERTY(a.id,a.name,'PRECISION')as长度,
isnull(COLUMNPROPERTY(a.id,a.name,'Scale'),0)as小数位数,
(casewhena.isnullable=1then'√'else''end)允许空,
isnull(e.text,'')默认值,
isnull(g.[value],'')AS字段说明 共6页 第1页
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 728x15, 创建于 08-4-23MSDN */google_ad_slot = "3624277373";google_ad_width = 728;google_ad_height = 15;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<script type="text/javascript"><!--google_ad_client = "pub-2947489232296736";/* 160x600, 创建于 08-4-23MSDN */google_ad_slot = "4367022601";google_ad_width = 160;google_ad_height = 600;//--></script><script type="text/javascript"src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
- 收藏几段SQL语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程!
- 收藏几段SQL Server语句和存储过程
- 几段SQL Server语句和存储过程(收藏)
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- 收藏几段SQL Server语句和存储过程
- C++通过http下载二进制文件
- MSSQLSERVER中如何快速获取表的记录总数
- insmod module 失败(skyeye + armlinux)
- 如何通过崩溃地址找到出错的代码行(ZT)
- 封装机制封装的概念
- 收藏几段SQL语句和存储过程
- 成员方法
- SRM 387 DIV2 [600]
- C++网络开发包ACE环境的配置与调试
- 第5章 消息、继承与多态1
- SQL交叉表实例
- 抽象类、接口与包
- CString,string,char*的综合比较(一)
- 用DTS导入文件的两个小技巧