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
查看全文
相关阅读:
使用angularjs定义html中的属性ng-attr-(suffix)
JS设置cookie、读取cookie、删除cookie
正则判断
console使用方法
angularjs中ng-change使用方法
angularjs中ng-selected使用方法
angularjs工具方法
angularjs中$watch监听model(对象属性、对象)变化
JS获取select选中的值,所有option值
AngularJs:String类型和JSON相互转换
原文地址:https://www.cnblogs.com/Ammy/p/1219333.html
最新文章
luogu P2700 逐个击破
[九省联考2018]秘密袭击coat
树形依赖背包dp的最优解问题
[HAOI2015]树上染色
SDOI2006 保安站岗
UVA1407 Caves
CF 奇怪的中位数
浅谈博弈论之Nim初步(xor正确性的浅显证明)
[SHOI2008]小约翰的游戏
poj2960 S-Nim
热门文章
poj2975 Nim
[Ispc2009]Let there be rainbows!
[JSOI2008]Blue Mary开公司(李超线段树)
Zju1610 Count the Colors
线段树之线段操作之陈老师的福利
普通平衡树
最敏捷的机器人(线段树维护区间最值)
线段树之Sum
左偏树教程
【洛谷】CYJian的水题大赛【第二弹】解题报告
Copyright © 2011-2022 走看看