国产成人毛片视频|星空传媒久草视频|欧美激情草久视频|久久久久女女|久操超碰在线播放|亚洲强奸一区二区|五月天丁香社区在线|色婷婷成人丁香网|午夜欧美6666|纯肉无码91视频

sql如何查看表內(nèi)容 在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;