[20190910] descending index on the issue 5.txt

[20190910] descending indexes on the issue 5.txt

- // index TERM tested using 0xfe said the recall special character encoding issues previously encountered in descending order of the index, but now forgotten.
- // Now think about was how out of their own guess, ^ _ ^.
- // link: http: //blog.itpub.net/267265/viewspace-2221527/ => [20181124 ] 2.txt descending indexes on the issue

- then // summary:
- // short point is that sort needs, out of a pit (ending plus FF), and to enter into a deeper pit, occupation chr (0) code, and chr (0) and occupied chr (1) of the code, and enter
- a deeper // pit. The results appear this special code, in fact, some developers to provide some reference, see how oracle technical personnel to achieve these, although I do not know as
- // how to write the code.

- // make a record again:
ASCII code coding
-------------------------------------- -------
0x00 FEFE
0x0000 FEFD
0x0001 FEFC
0x00NN (0xNN> = 0x02) FEFB (Note: 0x00 encoding means in front, seen here again a little halo)
0x01 Fefa
0x0100 FEF9
0x0101                  FEF8        
0x01NN(0xNN>=0x02)      FEF7(注:指前面0x01编码)
---------------------------------------------

WITH x0
     AS ( SELECT '00' a, CHR (0) b FROM DUAL
         UNION ALL
         SELECT '01', CHR (1) FROM DUAL
         union all
         SELECT '02', CHR (2) FROM DUAL
         )
select * from (
SELECT x1.a || x2.a c10, sys_op_descend (x1.b || x2.b) c20  FROM x0 x1, x0 x2
union all
SELECT x1.a c10, sys_op_descend (x1.b) c20 FROM x0 x1 ) order by c10 ;

C10        C20
---------- --------------------
00         FEFEFF
0000       FEFDFF
0001       FEFCFF
0002       FEFBFDFF
01         FEFAFF
0100       FEF9FF
0101       FEF8FF
0102       FEF7FDFF
02         FDFF
0200       FDFEFEFF
0201       FDFEFAFF
0202       FDFDFF
12 rows selected.

Guess you like

Origin www.cnblogs.com/lfree/p/11503369.html