首页 > 其他 > 详细

存储过程

时间:2015-08-07 19:21:53      阅读:107      评论:0      收藏:0      [点我收藏+]

 

 1 SET NOCOUNT ON;
 2   declare @taba table(
 3             CityD int    ,
 4             Cityame  nvarchar    (50)
 5         )    
 6    insert into @taba  select CityID,CityName from T_City 
 7    
 8    declare @CityD int    ,
 9             @Cityame  nvarchar    (50)
10             
11    while EXISTS(select * from @taba)
12    begin
13      select top 1 @CityD=CityD ,@Cityame= Cityame from @taba 
14      Update  I_IPCity set CityID= @CityD   where  charindex(@Cityame,Area)   >0
15      delete top (1)   from @taba    
16    end

 

存储过程

原文:http://www.cnblogs.com/woloveprogram/p/4711332.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!