Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Oracle series: (16) pagination

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Review mysql pagination

Use the limit keyword

Query the first two records in the users table

Select * from users limit 0Pol 2

Or

Select * from users limit 2

0 represents the index number of the first record, starting with 0

2 indicates that a maximum of two records are selected

Query the first three records of users

Select * from users limit 0pl 3

Or

Select * from users limit 3

Find out the records of articles 2 to 4 of users

Select * from users limit 1 Pol 3

Review hibernate pagination API

Query.setFirstResult (0); Query.setMaxResult (3)

What is rownum and what are its characteristics

1) rownum is a key word for oracle.

2) rownum is with the watch, the watch dies, the watch dies when it is in the

3) by default, rownum cannot be found in the table

4) only when rownum is clearly written in the select clause can it be displayed.

5) rownum is of type number and is uniquely continuous

6) the minimum value of rownum is 1, and the maximum value is the same as the number of records you have

7) rownum can also participate in relational operations

* rownum = 1 has a value

* rownum

< 5 有值 * rownum 2 无值 * rownum >

= 2 No valu

* rownum 2 has the same value as rownum < 2

* rownum = 2 has no value

8) based on the characteristics of rownum, we usually use rownum only for

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report