Hi i need to update some columns from some rows in a table, i'm using a oracle database.
I have a
java method that returns a list of primary keys, this primary keys refers the rows that i need to update, my problemen is that i dont know what would be the best choice to updates this rows.
Here is an example:
I tun my method and my method return a list with five primary keys (five ids) like this : (2, 4, 5, 1, 9) then i need to update the rows that represent those primary keys
Bu i dont know what is the best choice to do this. and i have the following ideas
1) have a store procedure with a for method that goes from 1 to the size of the list and inside this for method i would put a update sentences like this
2) my second idea is if there a way to do and update and pass it my list of primary keys in the "where" part of the select, like putting a select in the "where" part and this select would bring me the list of ids,
if this is posible how could it be?