[SQLServer2005] 动态语句申明游标
发布时间:2020-12-12 15:23:27 所属栏目:MsSql教程 来源:网络整理
导读:在sql存储过程时,有时可能需要处理动态语句返回的游标值。例子如下: ? set @str_sql = 'declare cur1 cursor for select distinct startdate from ' + @str_tablename;execute (@str_sql);open cur1;fetch next from cur1 into @i_startdate;while (@@fetch_
在sql存储过程时,有时可能需要处理动态语句返回的游标值。例子如下: ? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |