![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
SQL Sever
liu834189447
这个作者很懒,什么都没留下…
展开
-
如何用SQL 来核查序号是否连续
select id+1 from TABLE where id+1 not in(select id from TABLE) and id+1<>(select max(id)+1 from TABLE) 执行后的结果就是缺少的 编号原创 2020-11-13 09:16:45 · 2402 阅读 · 1 评论 -
SQL Update多表联合更新
前两行为:从另一个数据库拉数据到临时表,#a、#b 第三行:动态插入数据 第四行:更新数据 最后两行:释放临时表原创 2019-10-23 17:34:05 · 570 阅读 · 0 评论 -
SQL中的循环、for循环、游标,sql 怎么循环每一行数据
我们使用SQL语句处理数据时,可能会碰到一些需要循环遍历某个表并对其进行相应的操作(添加、修改、删除),这时我们就需要用到咱们在编程中常常用的for或foreach,但是在SQL中写循环往往显得那么吃力 要SQL中写类似for循环,我这里使用的是SQL中的游标来实现,当然SQL中也有for loop、while do等,我这里仅以使用游标方式来进行示例,其它的方式大家有兴趣可以研究一下,成功的同学...转载 2019-10-12 11:01:38 · 2061 阅读 · 0 评论 -
A server error occured on the current command. The results, if any, should be discarded
A server error occured on the current command. The results, if any, should be discarded. Review了一下日志,重建了发生异常的现场,Debug了一下,错误信息是: A server error occured on the current command. The results, if any, sho...转载 2019-01-30 18:28:29 · 2343 阅读 · 0 评论