博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
游标的使用
阅读量:4631 次
发布时间:2019-06-09

本文共 368 字,大约阅读时间需要 1 分钟。

把一张表的 每行数据的 一个字段的值进行随机

declare @tid intdeclare topic_cur cursor forselect tidfrom bbs_topicsopen topic_curfetch next from topic_cur into @tidwhile (@@fetch_status=0)beginUPDATE [dbo].[bbs_topics] SET iconid=CEILING(rand()*15) WHERE tid=@tidfetch next from topic_cur into @tidendclose topic_curdeallocate topic_cur

 

转载于:https://www.cnblogs.com/zhuangke668/p/3937250.html

你可能感兴趣的文章
contest16 CF315 div2+div1F oooxox oooxox oooooo
查看>>
ubuntu下如何用命令行运行deb安装包
查看>>
luacom cygwin
查看>>
『ACM C++』 PTA 天梯赛练习集L1 | 044-45
查看>>
Duilib
查看>>
hdu--2545--数据弱了?
查看>>
链接思维导图 -读《深入理解计算机系统》
查看>>
PostgreSQL窗口函数
查看>>
学习笔记(一)
查看>>
android一体机的开发问题
查看>>
java中equals和==的区别
查看>>
bzoj3675: [Apio2014]序列分割
查看>>
LC-349 两个数组的交集
查看>>
POJ 1087 A Plug for UNIX 【最大流】
查看>>
2013人人网校园招聘笔试题
查看>>
JavaScript:概述
查看>>
验证视图状态MAC失败解决方案
查看>>
RCP学习笔记
查看>>
CentOS双网卡双IP设置
查看>>
敏捷软件开发:原则、模式与实践——第2章 极限编程概述
查看>>