Skip to content

Commit fd410fd

Browse files
Assign sequential number
1 parent 0a7bd3d commit fd410fd

File tree

1 file changed

+2
-2
lines changed
  • HibernateSpringBootAssignSequentialNumber

1 file changed

+2
-2
lines changed

HibernateSpringBootAssignSequentialNumber/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
**[How To Efficiently Assign A Database Temporary Sequential Value To Rows](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootAssignSequentialNumber)**
1+
**[How To Efficiently Assign A Database Temporary Sequence Of Values To Rows](https://github.com/AnghelLeonard/Hibernate-SpringBoot/tree/master/HibernateSpringBootAssignSequentialNumber)**
22

33
<b><a href="https://persistencelayer.wixsite.com/springboot-hibernate/post/how-to-efficiently-assign-a-database-sequential-number-to-dto-rows">If you prefer to read it as a blog-post containing the relevant snippets of code then check this post</a></b>
44

55
**Description:** This application is an example of assigning a database temporary sequence of values to rows via the window function, `ROW_NUMBER()`. This window function is available in almost all databases, and starting with version 8.x is available in MySQL as well.
66

77
**Key points:**
8-
- commonly, you don't need to fetch in the result set the temporary sequence of values produced by `ROW_NUMBER()` (you will use it internally, in the query), but, this time, let's write a Spring projection (DTO) that contains a getter for the column generated by `ROW_NUMBER`as well
8+
- commonly, you don't need to fetch in the result set the temporary sequence of values produced by `ROW_NUMBER()` (you will use it internally, in the query, usually in the `WHERE` clause), but, this time, let's write a Spring projection (DTO) that contains a getter for the column generated by `ROW_NUMBER`as well
99
- write several native querys relying on `ROW_NUMBER()` window function
1010

1111
**Output sample:**\

0 commit comments

Comments
 (0)