Native

In this short Spring Data JPA tutorial, you will learn how to create a JPA Native SQL Query to select specific columns only. JPA Native SQL Query to Select Specific Columns Below is an example of JPA Native Query that selects from a database table called Users only two columns: first_name and, last_name @Query(value=”select first_name,…

Read More Select Specific Columns with JPA Native Query

In this short Spring Data JPA tutorial, you will learn how to use the LIKE % expression in a Native SQL Query. When using advanced SQL LIKE expression the % sign in the SQL query would represent zero, one or multiple characters. Let’s have a look at the Native JPA SQL Query that uses advanced…

Read More How to Use LIKE % Expression in JPA SQL Query

In this short Spring Data JPA tutorial, you will learn how to write a Native UPDATE SQL query. Let’s assume you need to run the following SQL query: update users u set u.EMAIL_VERIFICATION_STATUS = ‘true’ where u.USER_ID = ‘5JwQBHd1mL73XEg8S2e2w4ITn9gOW4’ I assume you will not want to hardcode the values of EMAIL_VERIFICATION_STATUS and USER_ID into SQL…

Read More Spring Data JPA Native UPDATE SQL Query