请问:仅在SQL中怎样实现遍历查询记录

请教:仅在SQL中怎样实现遍历查询记录?
我的需求是这样的:
1、从一个表中查询符合条件的字段1
2、想遍历查询字段1的值,根据值不同,调用各自的SP用于其他计算处理

不知道仅在SP中使用SQL语句是否可以实现
谢谢!

------解决方案--------------------
所谓的遍历字段1是否就是查询出字段1的一组值,然后按照每个字段1里的值来决定sp的使用

可以用游标执行



declare @col1 varchar(50)
declare cursor1 cursor for
select col1 from tb
open cursor1
fetch next from cursor1 into @col1
while @@fetch_status=0
begin
if @col1='a' exec sp1
else if @col1='b' exec sp2
else if @col1='c' exec sp3
else if @col1='d' exec sp4
else exec sp5
fetch next from cursor1 into @col1
end
close cursor1
deallocate cursor1