This content has been marked as final. Show 4 replies
The SYS_TYPEID function will tell you this. The supertype will have a SYS_TYPEID of '01'.
PL/SQL doesn't have this function so you'll need a SELECT SYS_TYPEID(p_obj) INTO v_typeid FROM dual call.
ok just found the IS OF predicate
create an overloaded procedure
create procedure p_x(p_obj super_type);
do supertype code here
create procedure p_x(p_obj sub_type);
do subtype code here
Your question was regarding PL/SQL. IS OF TYPE (type_name) or IS OF (ONLY type_name) are SQL constructs which is why I told you the SYS_TYPEID function. You can't use IS OF in an IF statement, only in a SQL predicate.