First, construct some data droptabletest; createtabletest (namevarchar2 (10), accountnumber (5); insertinto
First, construct some data drop table test; create table test (name varchar2 (10), account number (5); insert
First, construct some data
Drop table test;
Create table test
(
Name varchar2 (10 ),
Account number (5)
);
Insert into test values ('zhang san', '5 ');
Insert into test values ('wang wu', '10 ');
Insert into test values ('小', '10 ');
Insert into test values ('Li si', '20 ');
Insert into test values ('s3', '40 ');
Insert into test values ('4', '50 ');
Insert into test values ('5', '90 ');
Insert into test values ('sixty-six ', '90 ');
Insert into test values ('7', '90 ');
Commit;
The following describes the ranking results of some methods:
1. select t. *, dense_rank () over (order by t. account asc) ranking from test t;
2. select t. *, dense_rank () over (order by t. account desc) ranking from test t;
3. select t. *, rank () over (order by t. account asc) ranking from test t;
4. select t. *, rank () over (order by t. account desc) ranking from test t;