PROMPT CREATE OR REPLACE FUNCTION is_it_hold

CREATE OR REPLACE
FUNCTION is_it_hold
  (p_hold_no IN holds.hold_no%TYPE)
  RETURN BOOLEAN IS
  l_count PLS_INTEGER DEFAULT 0;
  BEGIN
    SELECT COUNT(*) INTO l_count FROM holds WHERE hold_no = p_hold_no;
    RETURN (l_count > 0);
  EXCEPTION
    WHEN OTHERS THEN
      RETURN FALSE;
  END is_it_hold;
/
