devxlogo

Avoid Multiple Exit Points in a Function

Avoid Multiple Exit Points in a Function

If you have a database function that has multiple return statements, try to minimize the exit points. I will explain with the following example:

 create or replace function getStatus(p_status_code in varchar2)	return varchar2 is begin		if  	p_status_code =

devx-admin

Share the Post: