随笔分类 -  MsSql

SQL Server 批量插入数据的两种方法
摘要:http://blog.csdn.net/tjvictor/article/details/4360030 https://www.cnblogs.com/qianxingdewoniu/p/6119791.html 在SQL Server 中插入一条数据使用Insert语句,但是如果想要批量插入一 阅读全文

posted @ 2017-11-13 17:37 chengjunde 阅读(330) 评论(0) 推荐(0)

MySQL中函数CONCAT及GROUP_CONCAT
摘要:一、CONCAT()函数CONCAT()函数用于将多个字符串连接成一个字符串。使用数据表Info作为示例,其中SELECT id,name FROM info LIMIT 1;的返回结果为+ + +| id | name |+ + +| 1 | BioCyc |+ + +1、语法及使用特点:CONC 阅读全文

posted @ 2017-11-13 15:20 chengjunde 阅读(176) 评论(0) 推荐(0)

SQL SERVER 日志已满的处理方法 (转)
摘要:事务日志文件Transaction Log File是用来记录数据库更新情况的文件,扩展名为ldf。在 SQL Server 7.0 和 SQL Server 2000 中,如果设置了自动增长功能,事务日志文件将会自动扩展。一般情况下,在能够容纳两次事务日志截断之间发生的最大数量的事务时,事务日志的 阅读全文

posted @ 2017-09-27 13:45 chengjunde 阅读(278) 评论(0) 推荐(0)

SQL删除重复数据只保留一条
摘要:http://blog.csdn.net/anya/article/details/6407280/ 用SQL语句,删除掉重复项只保留一条 在几千条记录里,存在着些相同的记录,如何能用SQL语句,删除掉重复的呢1、查找表中多余的重复记录,重复记录是根据单个字段(peopleId)来判断 select 阅读全文

posted @ 2016-12-06 09:04 chengjunde 阅读(4495) 评论(0) 推荐(1)

sql 常用的查询套路
摘要:1. 写一个sql:,查询商城每天的用户数及每天累计用户数 date user_count total_count2016-12-01 1 12016-12-02 2 32016-12-03 2 52016-12-04 6 11 (user_count 每天的访问数 total_count 总访问数 阅读全文

posted @ 2016-12-05 17:22 chengjunde 阅读(724) 评论(0) 推荐(0)

传统的Ado.net 参数设置:params SqlParameter[] commandParameters
摘要:C#代码 ExecuteReader(string connectionString, CommandType commandType, string commandText, params SqlParameter[] commandParameters) 以params声明的形参说明参数的个数是 阅读全文

posted @ 2016-05-13 17:25 chengjunde 阅读(1136) 评论(0) 推荐(0)

SQL的主键和外键约束 小记
摘要:http://www.cnblogs.com/ywb-lv/archive/2012/03/12/2391860.html 阅读全文

posted @ 2016-04-28 16:00 chengjunde 阅读(156) 评论(0) 推荐(0)

MES取所有部门的函数实例
摘要:USE [ChangHong]GO/****** Object: UserDefinedFunction [dbo].[FN_GetDeptCode] Script Date: 04/26/2016 14:32:24 ******/SET ANSI_NULLS ONGOSET QUOTED_IDEN 阅读全文

posted @ 2016-04-26 15:35 chengjunde 阅读(202) 评论(0) 推荐(0)

分页存储过程
摘要:USE [ChiefmesNEW]GO/****** Object: StoredProcedure [dbo].[st_MES_RS_Pages] Script Date: 04/22/2016 10:16:10 ******/SET ANSI_NULLS OFFGOSET QUOTED_IDEN 阅读全文

posted @ 2016-04-22 10:18 chengjunde 阅读(105) 评论(0) 推荐(0)

sqlserver锁表、解锁、查看锁表
摘要:sqlserver锁表、解锁、查看锁表 http://www.cnblogs.com/zfanlong1314/p/3698566.html http://www.cnblogs.com/chjf2008/archive/2012/11/21/2780787.html http://www.cnbl 阅读全文

posted @ 2016-04-19 18:32 chengjunde 阅读(219) 评论(0) 推荐(0)

杂记
摘要:oracle的分析函数over(Partition by...)http://zonghl8006.blog.163.com/blog/static/4528311520083995931317/http://www.cnblogs.com/wingsless/archive/2012/02/04/ 阅读全文

posted @ 2016-04-18 18:50 chengjunde 阅读(93) 评论(0) 推荐(0)

Rank() over(partition ... 分组统计的实例
摘要:USE [NanFeng]GO/****** Object: StoredProcedure [dbo].[st_MES_RptMaterilSum] Script Date: 04/18/2016 14:21:24 ******/SET ANSI_NULLS ONGOSET QUOTED_IDEN 阅读全文

posted @ 2016-04-18 18:25 chengjunde 阅读(590) 评论(0) 推荐(0)

处理异常刷卡记录存储过程
摘要:USE [ChiefmesNEW]GO/****** Object: StoredProcedure [dbo].[st_Alarm_DealStatStopCard] Script Date: 04/12/2016 10:36:06 ******/SET ANSI_NULLS ONGOSET QU 阅读全文

posted @ 2016-04-12 14:39 chengjunde 阅读(479) 评论(0) 推荐(0)

MES生产日报存储过程
摘要:USE [ScreenMonitor]GO/****** Object: StoredProcedure [dbo].[ImportProductForDay] Script Date: 04/11/2016 17:31:55 ******/SET ANSI_NULLS ONGOSET QUOTED 阅读全文

posted @ 2016-04-12 10:11 chengjunde 阅读(491) 评论(0) 推荐(0)

Hadoop实战第一篇
摘要:http://www.cnblogs.com/SeaSky0606/p/4711785.html 阅读全文

posted @ 2016-04-12 00:06 chengjunde 阅读(101) 评论(0) 推荐(0)

SQL Delta实用案例介绍 (对应软件)
摘要:http://blog.csdn.net/hongdi/article/details/5363209 阅读全文

posted @ 2016-04-11 18:45 chengjunde 阅读(235) 评论(0) 推荐(0)

SQL Select count(*)和Count(1)的区别和执行方式及SQL性能优化
摘要:SQL性能优化:http://www.cnblogs.com/CareySon/category/360333.html Select count(*)和Count(1)的区别和执行方式 在SQL Server中Count(*)或者Count(1)或者Count([列])或许是最常用的聚合函数。很多 阅读全文

posted @ 2016-04-11 18:33 chengjunde 阅读(3752) 评论(1) 推荐(2)

用乐观并发方式处理数据库并发冲突以保证数据一直性的代码处理方法
摘要:http://www.cnblogs.com/chenlulouis/archive/2010/07/06/1772235.html 阅读全文

posted @ 2016-04-05 18:23 chengjunde 阅读(210) 评论(0) 推荐(0)

st_Alarm_GenAlarmDealTime
摘要:USE [ChiefmesNew]GO/****** Object: StoredProcedure [dbo].[st_Alarm_GenAlarmDealTime] Script Date: 04/05/2016 09:42:54 ******/SET ANSI_NULLS ONGOSET QU 阅读全文

posted @ 2016-04-05 18:20 chengjunde 阅读(299) 评论(0) 推荐(0)

MsSQL的游标的综合运用
摘要:USE [ChiefWMS]GO/****** Object: StoredProcedure [dbo].[WMS_Check] Script Date: 04/05/2016 09:51:13 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONG 阅读全文

posted @ 2016-04-05 10:26 chengjunde 阅读(281) 评论(0) 推荐(0)

导航