zoukankan
html css js c++ java
接规则,每三个一组编一个号
create
table
#examinees(exam_number
varchar
(
16
), room
int
)
insert
#examinees(exam_number)
select
'
100100010001
'
union
all
select
'
100100010002
'
union
all
select
'
100100010003
'
union
all
select
'
100100010004
'
union
all
select
'
100100020001
'
union
all
select
'
100100020002
'
union
all
select
'
100100020003
'
union
all
select
'
100100020004
'
union
all
select
'
100100020005
'
union
all
select
'
100100040001
'
union
all
select
'
100100050001
'
union
all
select
'
100100060001
'
union
all
select
'
100100060002
'
union
all
select
'
100100060003
'
union
all
select
'
100100060004
'
union
all
select
'
100100060005
'
union
all
select
'
100100060006
'
select
*
from
#examinees
update
a
set
room
=
(
select
sum
((rs
+
2
)
/
3
)
from
(
select
rs
=
count
(
*
)
from
examinees
where
substring
(exam_number,
7
,
2
)
<
substring
(a.exam_number,
7
,
2
)
or
(
substring
(exam_number,
7
,
2
)
=
substring
(a.exam_number,
7
,
2
)
and
exam_number
<=
a.exam_number)
group
by
substring
(exam_number,
7
,
2
)) b )
from
examinees a
查看全文
相关阅读:
Web API系列(三)统一异常处理
Web API系列(二)接口安全和参数校验
Web API系列(一)设计经验与总结
文件并发(日志处理)--队列--Redis+Log4Net
Jquery手机下拉刷新,下拉加载数据
nginx 几个参数
op cache config
历史问题回顾
第三方服务的使用
nginx+php-fpm json_encode 到client pages 截断
原文地址:https://www.cnblogs.com/Ammy/p/1219333.html
最新文章
Css中的!important
CSS世界中的“盒子”
CSS3中resize属性
HTML5中canvas与SVG有什么区别
js中的"=="和equals()以及is()三者的区别
抽象类与抽象方法
Mac 常用命令
Oracle 创建自增列
DependencyProperty
DOS常用命令
热门文章
线程同步----手控同步
CSS选择器
sqlserver:游标
表变量
jQuery解析json
基于ASP.NET MVC(C#)和Quartz.Net组件实现的定时执行任务调度
理解C# 4 dynamic(3) – DynamicObject的使用
理解C# 4 dynamic(2) – ExpandoObject的使用
理解C# 4 dynamic(1)
在网页中插入百度地图
Copyright © 2011-2022 走看看