1.简单的循环语句declare @i intset @i = 0while @i < 100beginprint @iset @i = @i + 1end2.使用Sqlserver自带的while循环来循环表数据-- 定义循环变量declare @loopIndex int set @loo......
---判断是否存在该存储过程IF EXISTS (SELECT * FROM DBO.SYSOBJECTS WHERE ID = OBJECT_ID(N'[dbo].[WEB_PageView]') and OBJECTPROPERTY(ID, N'IsProcedure') = 1)DROP PROCEDURE......