函数调用错误:wrong number or types of arguments in call to 'ID_IS_GOOD'
函数:
CREATE OR REPLACE FUNCTION id_is_good (i_student_id IN NUMBER) RETURN BOOLEANAS v_id_cnt NUMBER;BEGIN SELECT COUNT(*) INTO v_id_cnt FROM student WHERE student_id = i_student_id; RETURN 1 = v_id_cnt;EXCEPTION WHEN OTHERS THEN RETURN FALSE;END id_is_good;
1 declare 2 v_local_first_name student.first_name%type; 3 v_local_last_name student.last_name%type; 4 rst BOOLEAN ; 5 begin 6 rst := id_is_good(&sv,v_local_first_name, v_local_last_name); 7 dbms_output.put_line(rst); 8 end;
--如果需要打印,可以这样if rst then dbms_output.put_line('TRUE');else dbms_output.put_line('FALSE');end if;