Use database statement summary

0, SELECT * FROM CHARACTER_SETS LIMIT 0,10 # CHARACTER_SETS from the table, starting from the first row, row extraction [10] comprising a first row

1, SELECT * FROM `CHARACTER_SETS` ORDER BY` MAXLEN` DESC LIMIT 0,10 # of CHARACTER_SETS table, MAXLEN column values ​​sorted in descending order, and pick the first row from the beginning, the extraction line 10. # DESC removed is sorted in ascending order

2、row_number() over(partition by xxx order by xxx)的用法

      Oracle in row_number () over (partition by xxx order by xxx) usage

  row_number() over(partition by a order by b)
  The above means that the query results by a field of the packet (Partition), and then sorting the groups according to b field, as desc or asc, can choose, and then returns a rownumber for marking each row is sequentially recorded

Guess you like

Origin www.cnblogs.com/Formulate0303/p/11528342.html