主键生成器[3]

[入库:2005年8月18日] [更新:2007年3月24日]

本文简介:选择自 lsmxcool 的 blog

       if ( datediff (day, @today , @prctmpdate ) < 0 )   --比较    若当前日期<上次日期  ,令  

                   --上次日期=上次日期 上次编号置为零

           begin

             update tbrecno  set prenum = '1' ,predate = @today where frecord=@precrecord

           end 

       else if (datediff(day,  @today , @prctmpdate ) = 0 )  --若当前日期=上次日期  ,令上次编号加一

           begin

             update tbrecno set prenum = prenum + 1 where frecord=@precrecord     

本文关键:主键生成器
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top