您的位置:首页 > 博客中心 > 数据库 >

sqlserver 循环加类型转换拼接

时间:2022-03-14 01:53

  declare @i int
  set @i=1;
  while @i<50
  begin
  insert [GCSDB].[dbo].[ORGANIZATION_UNIT] (
      [ORG_UNIT_ID]
      ,[ORG_UNTI_NAME]
      ,[ORG_UNTI_REMARK]
      ,[UNIT_IS_SIMULATE])
      values (@i,cast(@i as varchar(10))+‘号‘,‘‘,1)
   set @i = @i + 1
  end
 

热门排行

今日推荐

热门手游