sql server 2005 游标使用小例
2009-06-13 08:46
351 查看
declare @IP varchar(50),@Email varchar(50)
declare tc cursor for select HostIP,UserEmail from RestartLog
open tc
fetch next from tc into @IP , @Email
while @@fetch_status = 0
begin
print @IP+' '+@Email
fetch next from tc into @IP , @Email
end
close tc
deallocate tc //删除对游标变量的引用
declare tc cursor for select HostIP,UserEmail from RestartLog
open tc
fetch next from tc into @IP , @Email
while @@fetch_status = 0
begin
print @IP+' '+@Email
fetch next from tc into @IP , @Email
end
close tc
deallocate tc //删除对游标变量的引用
相关文章推荐
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作(转)
- sql server 2000/2005 游标的使用操作
- FIX: 错误消息当您使用服务器端游标来运行 SQL Server 2005 中大型复杂查询: " " 错误 8623, 严重性 16, 状态 1: 查询处理器用尽了超出内部资源:::
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作
- sql server 2005 游标使用小例
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作
- sql server 2000/2005 游标的使用操作
- SQL Server 2005出现的游标错误的解决方法
- SQL Server游标的使用【转】
- SQL server 2005 UNPIVOT运算符的使用
- Sql Server 2005 Express 无法使用SA用户登陆解决
- SQL SERVER 2005:在After Insert触发器中使用INSERT后,影响SCOPE_IDENTITY 问题
- 如何在SQL Server 2005中使用作业实现备份和特定删除
- [SQL Server] 游标的简单使用
- sql server在存储过程中使用游标和事务