悉野小楼

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

统计

04 2012 档案

在App_Code中获取Session,Request
摘要:System.Web.HttpContext.Current.SessionSystem.Web.HttpContext.Current.Request在asp.net中,ihttphander处理函数中, 随时都可以获取Current对象的 阅读全文

posted @ 2012-04-30 09:43 悉野 阅读(546) 评论(0) 推荐(0) 编辑

Sqlserver数据表中, 从不连续数字编号中得到最小空缺值
摘要:原来编号是分段的, 1-1000表示一个类别, 1000-2000表示一个类别. 现在编号自动生成不要类别, 要找原来数据中最小的数据编号.本想是用个2分递归来查, 但效率太慢了. 想到了个方法用行号.select id, row_number() over (order by id) as rownum from items上面可以查询出id与行号对应的表, 再查看rownum与id不同就是空的id号了.完整为:select top 1 rownum from (select id, row_number() over (order by id) as rownum from items) 阅读全文

posted @ 2012-04-13 10:45 悉野 阅读(1834) 评论(1) 推荐(0) 编辑

点击右上角即可分享
微信分享提示