卖逼视频免费看片|狼人就干网中文字慕|成人av影院导航|人妻少妇精品无码专区二区妖婧|亚洲丝袜视频玖玖|一区二区免费中文|日本高清无码一区|国产91无码小说|国产黄片子视频91sese日韩|免费高清无码成人网站入口

sql查詢表中最大值 在SQL中,如何查詢某一字段中最大值的數(shù)據(jù)?

在SQL中,如何查詢某一字段中最大值的數(shù)據(jù)?1、創(chuàng)建測(cè)試表,create table test_max2(id number, score number)2、插入測(cè)試數(shù)據(jù),insert into te

在SQL中,如何查詢某一字段中最大值的數(shù)據(jù)?

1、創(chuàng)建測(cè)試表,create table test_max2(id number, score number)

2、插入測(cè)試數(shù)據(jù),insert into test_max2 values(1001, 99)insert into test_max2 values(1002, 85)insert into test_max2 values(1003, 100)insert into test_max2 values(1004, 77)insert into test_max2 values(1005, 66)

3、查詢數(shù)據(jù)表,發(fā)現(xiàn)最大的score值為100;select t.*, t.rowid from TEST_MAX2 t4、查詢score值為最大(100)的記錄;select * from (select t.*, row_number() over(order by score desc) rn from TEST_MAX2 t) where rn = 1;