Please help, I was trying with an oracle procedure that takes as a parameter a variable then use it in SELECT INTO, The problem is the procedure doesn't consider this variable as one value.
This is a simple a code that explains what I mean.
ps : id_res is a primary key.
CREATE OR REPLACE PROCEDURE annuler_res(id_res in number)
UPDATE reservation SET etat_res='annulé' WHERE reservation.id_res= id_res;
This is my table before execution of the procedure
When I execute it
And after execution all records are updated instead of one
PS: I have created before this a procedure that in some how simulat an auto increment primary key.
oracle stored procedure : variable is considered as *
nr: #1 dodano: 2017-12-30 16:12
Change the name of the variable, Oracle is treating id_res as table column so your query becomes similar to a WHERE 1=1