标签:logs order by bsp core 数字 center creat rom where
create table score1(
s_id number,
s_score decimal(5,2) --表示最大5位的数字,其中小数点后面两位小数
)
insert into score1 (s_id, s_score) values (‘1‘, ‘3.5‘);
insert into score1 (s_id, s_score) values (‘2‘, ‘3.65‘);
insert into score1 (s_id, s_score) values (‘3‘, ‘4.0‘);
insert into score1 (s_id, s_score) values (‘4‘, ‘3.85‘);
insert into score1 (s_id, s_score) values (‘5‘, ‘4.0‘);
insert into score1 (s_id, s_score) values (‘6‘, ‘3.65‘);
select *from score1
select s_score,(select count(distinct s_score)from score1 where s_score>=s.s_score)排名 from score1 s order by s_score desc
select count(distinct s_score)from score1
标签:logs order by bsp core 数字 center creat rom where
原文地址:http://www.cnblogs.com/tangjiang-code/p/7668393.html