0

i'm trying to delete n rows from database and n is variable should be given in the api method like deleting the last 10 boxes of items in supermarket which means they are sold so how i would do so i'm using spring data rest i don't know how to write the query in the repository and how i would get the variable n and use it in the sql query also i should check if that number of rows exist before deleting

  • Hi @Takla Gerguis, can you share an example, with tables, in order to understand, is the domain if you have also a piece of code that you are intending it could be great – Juan Caicedo May 12 '20 at 23:42
  • an example of asking questions of tables https://stackoverflow.com/questions/10269809/mysql-join-query – Juan Caicedo May 12 '20 at 23:42
  • i have table named items and each item has type i want to delete the first n items with certain type. this is a spring data project n will be given by the user i don't know how to get the variable n from the user and use it in the query in spring data rest – Takla Gerguis May 13 '20 at 13:48

0 Answers0