HOwever, if at all possible it is best to avoid doing loops becasue loops are performance hogs. What are you planning on doing in the loop, it may be possible to do it in a set-based fashion instead.
"NOTHING is more important in a database than integrity." ESquared