本文介绍了在SQL Server 2008中执行while循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在SQL Server 2008中是否有实现do while循环的方法?

解决方案

我不确定MS SQL Server 2008中的DO-WHILE,但是您可以更改WHILE循环逻辑,以便像DO-WHILE循环那样使用. /p>

示例摘自此处: http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords /

但是尝试在数据库级别 避免循环 .参考.

Is there any method for implement do while loop in SQL server 2008?

解决方案

I am not sure about DO-WHILE IN MS SQL Server 2008 but you can change your WHILE loop logic, so as to USE like DO-WHILE loop.

Examples are taken from here: http://blog.sqlauthority.com/2007/10/24/sql-server-simple-example-of-while-loop-with-continue-and-break-keywords/

But try to avoid loops at database level.Reference.

这篇关于在SQL Server 2008中执行while循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 05:07