文章分类 -  MS SQL

该文被密码保护。
posted @ 2019-09-26 14:25 Alex_Mercer 阅读(1) 评论(0) 推荐(0)
该文被密码保护。
posted @ 2019-09-09 11:41 Alex_Mercer 阅读(0) 评论(0) 推荐(0)
摘要:写程序的人,往往需要分析所写的SQL语句是否已经优化过了,服务器的响应时间有多快,这个时候就需要用到SQL的STATISTICS状态值来查看了。 通过设置STATISTICS我们可以查看执行SQL时的系统情况。选项有PROFILE,IO ,TIME。介绍如下: 阅读全文
posted @ 2019-09-09 11:40 Alex_Mercer 阅读(2573) 评论(0) 推荐(0)
摘要:来源地址:https://www.cnblogs.com/haocool/archive/2013/03/02/2940098.html创建链接服务器 1 exec sp_addlinkedserver 'ITSV ', ' ', 'SQLOLEDB ', '远程服务器名或ip地址 ' 2 exec 阅读全文
posted @ 2019-09-09 11:39 Alex_Mercer 阅读(89) 评论(0) 推荐(0)
摘要:来源地址:https://www.cnblogs.com/csdbfans/p/3504845.html 这里我只简单介绍一下 阅读全文
posted @ 2019-09-06 16:48 Alex_Mercer 阅读(106) 评论(0) 推荐(0)
摘要:1 --default 设置默认值 2 --not null 不允许为空 3 4 5 6 create table #test( 7 id int PRIMARY KEY, 8 name nvarchar(50) default '默认值', 9 name2 nvarchar(50) not nul 阅读全文
posted @ 2019-09-06 16:44 Alex_Mercer 阅读(72) 评论(0) 推荐(0)
摘要:视图相当于一张集合表注意:视图不可以传入参数,但是可以在where 后面写条件 1 if exists(select * from sys.objects where name='View_RibaoOA_ItemMasterCost') 2 drop view View_RibaoOA_ItemM 阅读全文
posted @ 2019-09-06 15:40 Alex_Mercer 阅读(94) 评论(0) 推荐(0)
摘要:1 --if exists(select * from sys.objects where name='test') 2 -- drop function fun_Ribao_PLMSoftwarePassRate_ProductType 3 /* 4 用于取出软件合格率中的 产品类型 5 传入文档 阅读全文
posted @ 2019-09-06 15:38 Alex_Mercer 阅读(83) 评论(0) 推荐(0)
摘要:文章来源:https://www.cnblogs.com/yangecnu/p/3702975.html 我这边只做简单的说明:1.ROW_NUMBER()over(order by MO_MO.ID) 这个是开窗函数,在另一篇日志中有,不做具体说明2.链接中的CTE,只是相当于简单的将数据插入临时 阅读全文
posted @ 2019-09-06 15:36 Alex_Mercer 阅读(64) 评论(0) 推荐(0)