Joke Collection Website - News headlines - 游标的详细用法
游标的详细用法
declare @ id int \ xd \ declare @ name varchar(5)\ xd \ declare cursor 1游标for -定义游标光标1\xd\select * from table1 -使用游标的对象(跟据需要填入挑选文)\ xd \打开光标1 -打开游标\ xd \将下一个从光标1提取到@id,@name -将游标向下移一行,获取的数据放入之前定义的变量@id,@name中\xd\while @@fetch_status= -判断是否成功获取数据\ xd \ begin \ xd \ update table 1 set name = name+' 1 ' \ xd \其中id=@id -进行相应处理(跟据需要填入结构化查询语言文)\ xd \将下一个从光标1提取到@id,@name -将游标向下移一行\ xd \ end \ xd \关闭光标1 -关闭游标\ xd \释放光标1
- Previous article:How to write numbers is easy to understand.
- Next article:Benefits and requirements of jazz dance
- Related articles
- What are the large state-owned enterprises in China?
- On World Forest Day, everyone protects the forest.
- Lamborghini brand knowledge
- How to write safety production notes in calligraphy class
- Seeking Chinese-English translation
- How to pick up express delivery during the epidemic?
- March 8th Women’s Day theme event planning, March 8th Festival activity theme, March 8th Women’s Day activity plan where can I find it?
- What idioms are there in chicken skin?
- Sentences of teenagers running desperately on the playground (a collection of 40 sentences)
- What city is sriracha chonburi in Thailand?