zoukankan      html  css  js  c++  java
  • SQL循环

    加群学习:457351423 这里有4000多部学习视频,有需要的欢迎进群学习!

    declare @temp Table
    (
    nf varchar(50),
    yf varchar(50),
    sm varchar(50)
    )
    declare @nd varchar(50), @yd int,@i int
    set @nd = '2016'
    if(@nd = year(getdate()))
    begin
    set @yd = MONTH(getdate())
    end
    else
    begin
    set @yd = 12
    end
    set @i = 1
    WHILE @i <= @yd
    BEGIN
    insert into @temp
    select @nd as nd, @i as yd, count(*) as sm from t_prtc_htbadj
    where year(CreateDate)=@nd and month(CreateDate)=@i
    set @i = @i + 1
    END
    select * from @temp

    加群学习:457351423 这里有4000多部学习视频,有需要的欢迎进群学习!

  • 相关阅读:
    369. Plus One Linked List
    147. Insertion Sort List
    817. Linked List Components
    61. Rotate List
    Object 类
    多态
    重写方法
    Protected 修饰符
    继承
    数组
  • 原文地址:https://www.cnblogs.com/ssk-bak/p/5596152.html
Copyright © 2011-2022 走看看