I created following procedure to remove item from allitems table by itemid, but procedure doesn't work as I wan,t. It Remove all items.
procedure DeleteItem(itemid in number) is
begin
delete from allitems where itemid=itemdid;
commit;
end;
I created following procedure to remove item from allitems table by itemid, but procedure doesn't work as I wan,t. It Remove all items.
procedure DeleteItem(itemid in number) is
begin
delete from allitems where itemid=itemdid;
commit;
end;
I know its not fashionable to have strict naming standards but they honestly help. Name your parameters prefixed with 'p_' so your code becomes;
create or replace procedure DeleteItem(itemid_in in number) is
begin
delete from allitems where itemid = itemid_in;
commit;
end;
I may not agree with all of it but take a look at Steven Feuerstein's take on this - https://community.oracle.com/servlet/JiveServlet/downloadBody/1007838-102-1-144760/PLSQL%20Naming%20Conventions%20and%20Coding%20Standards.pdf