zoukankan      html  css  js  c++  java
  • InfoSys SQL

    create table #temp(Name varchar(50))--创建临时表  
    insert #temp
    select name from syscolumns where id=(select max(id) from sysobjects where xtype='u' and name='T_Staff')
    select * from #temp
     declare @MyCursor CURSOR
     declare @Name nvarchar(50)
     set @MyCursor= CURSOR LOCAL SCROLL FOR   
                   select [name] from #temp  where [Name]<>'Name'
                   OPEN @MyCursor
                   fetch next from @MyCursor into @Name
               while @@fetch_status=0
                   begin  
       select cast(dbo.converttrim(@Name) as numeric(9,0)) as ColumnName from  dbo.T_Staff
              if(@@ERROR>0)
       begin
                       print @Name
        continue
       end
        fetch next from @MyCursor into @Name      
                   end
                close @MyCursor
                 deallocate @MyCursor
    drop table #temp
  • 相关阅读:
    springcloud(三)
    springcloud(二)
    spring-cloud(一)
    springboot(三)
    springboot(二)
    springboot(一)
    dubbox
    SpringBoot终章(整合小型进销系统)
    SpringBoot第三节(thymeleaf的配置与SpringBoot注解大全)
    SpringBoot--集成Shiro
  • 原文地址:https://www.cnblogs.com/zhangchenliang/p/1566023.html
Copyright © 2011-2022 走看看