文章分类 -  数据库

mssql一句话查询数据库表和字段结构
摘要: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 sysin 阅读全文
posted @ 2013-08-20 17:46 kitea 阅读(159) 评论(0) 推荐(0)
SQL Server Profiler使用方法
摘要:简介说到Sql的【性能工具】真是强大,可以让一个像我这样的菜鸟都能找到高手的感觉,SQL Server Profiler的中文意思是SQL Server事件探查,这个到低是做什么用的呢?我们都知道探查的意思大多是和监视有关,其实这个SQL Server Profiler就是一个Sql的监视工具,可以具体到每一行Sql语句,每一次操作,和每一次的连接。感觉这个工具的作用还是很大的,给大家分享一下,对于新手了解Sql语句的写法和提高语句的性能方法有很大的帮助。SQL Server Profiler使用方法 我们单击开始--程序--Microsoft SQL Server 2005--性能工具--S 阅读全文
posted @ 2012-09-07 13:30 kitea 阅读(4923) 评论(1) 推荐(1)
access 连接数据库dbhelp
摘要:using System;using System.Collections.Generic;using System.Configuration;using System.Collections;using System.Data;using System.Data.OleDb;using System.Reflection;namespace website{ public class db { public static string ConnStr = @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + AppDoma 阅读全文
posted @ 2012-03-15 13:19 kitea 阅读(422) 评论(1) 推荐(0)
大量并发数据库设计优化
只有注册用户登录后才能阅读该文。
posted @ 2011-12-05 17:33 kitea 阅读(8) 评论(0) 推荐(0)
少用且有用的SQL语句
摘要:以下是我平时在工作中收藏的一些觉得有用的SQL语句,共大家使用1.一句SQL语句获得当月天数:select Day(dateadd(day,-1,convert(datetime,convert(char(07),dateadd(m,1,getdate()),120)+ '-01 ')))select 32-Day(getdate()+(32-Day(getdate())))2.说明:选择从10到... 阅读全文
posted @ 2010-11-28 00:50 kitea 阅读(150) 评论(0) 推荐(0)