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
  • 相关阅读:
    Cookie和Seesion
    Forms组件
    分页器组件
    关于Django的Ajax操作
    Oracle常用数据库表操作
    redis的缓存穿透 缓存并发 缓存失效
    Struts2的拦截器
    Struts2的各种标签库
    Struts2基础知识
    Java常用数据结构和算法
  • 原文地址:https://www.cnblogs.com/zhangchenliang/p/1566023.html
Copyright © 2011-2022 走看看