troubleshooting Question

Oralce procedure input parameter

Avatar of toooki
toooki asked on
DatabasesOracle Database
3 Comments2 Solutions539 ViewsLast Modified:
I have a stored procedure that deletes a record based on the input parameter passed. I do not know what is going wrong but the below code is not working.

I have the table initially:

After I call myProd('abc') I expect to see 3 recrds except for 'abc' above.
What could be the correct oracle procedure for it....
Thanks in advance.

  Procedure myProd(branch_name IN varchar2) AS
    DELETE FROM MyTab WHERE BRANCH_NAME = ' || branch_name || '; --deleting no records.
--    DELETE FROM MyTab WHERE BRANCH_NAME = branch_name; //deleting all records!!
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 3 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros