您的位置:永利集团登录网址 > 计算机入门 > sqlserver【永利集团登录网址】 游标的简单示例

sqlserver【永利集团登录网址】 游标的简单示例

2019-11-22 23:58

Declare @Id varchar Declare @Name varchar Declare Cur Cursor For select substring as id,name from temp1 Open Cur Fetch next From Cur Into @Id,@Name While @@fetch_status=0 Begin Update temp Set [c3]=@Name where [id] like @Id+'%' Fetch Next From Cur Into @Id,@Name End Close Cur Deallocate Cur

本文由永利集团登录网址发布于计算机入门,转载请注明出处:sqlserver【永利集团登录网址】 游标的简单示例

关键词: