查询数据排名情况SQL |
本文标签:SQL,数据排名 1/准备测试数据 --------------------------------------------------------------------------------- insert into t1 values(1,2,3) insert into t1 values(1,8,4) insert into t1 values(1,4,5) insert into t1 values(1,5,5) insert into t1 values(2,2,3) insert into t1 values(2,8,4) insert into t1 values(2,4,5) insert into t1 values(2,5,5) 2/查看排名 --------------------------------------------------------------------------------- A/单记录排名 select c1,c3, c1 c3 order_num select c1,c2,c3,
|