首页 > 开发 > 综合 > 正文

存储过程

2024-07-21 02:46:11
字体:
来源:转载
供稿:网友
存储过程

 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    begin13      select top 1 @CityD=CityD ,@Cityame= Cityame from @taba 14      Update  I_ipCity set CityID= @CityD   where  charindex(@Cityame,Area)   >015      delete top (1)   from @taba    16    end


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表