I need to delete selective rows from Database using pl/sql procedure. But it deletes all rows irrespective of what is in where clause.
The student table is:-
id name class
1 danial 9
2 patrick 9
3 paul 8
create or replace procedure delete_student (stId in NUMBER)
begin
delete from students where class = stId;
commit;
end;
I call this procedure from jsf application sending, say 9 as argument. However, this procedure in effect deletes all three rows in the student table irrespective of the value of argument stId which outputs correctly in the DBMS_OUT console. What am i doing wrong.