这妞不错!

会有那么一天...

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::
USE [InformationSystem]
GO
/****** Object:  StoredProcedure [dbo].[Addcount]    Script Date: 05/06/2015 15:29:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
-- =============================================
-- Author:		<>
-- Create date: <2015-5-6 15:55:20>
-- Description:	<存储过程 while循环>
-- =============================================
ALTER PROCEDURE [dbo].[pro_whileTest]
AS
  BEGIN
	DECLARE @n bigint 
	DECLARE @Sql nvarchar(225)
	DECLARE @GetTime NVARCHAR(225)
	
	set @n=0
	SET @GetTime= Convert(varchar,getdate(),120)

	while @n<10
 
	begin Set @Sql='
	 INSERT INTO [InformationSystem].[dbo].[D_PortlCoutInfo]
			   (readtime,Count,Added,Status) VALUES ('''+@GetTime+''',44,0,0)'
     PRINT @Sql
           
	Exec (@Sql)  
 
	set @n=@n+1
	
  END


END

  

 

posted on 2015-05-06 16:07  这妞不错  阅读(504)  评论(0编辑  收藏  举报