CREATE FUNCTION rowne(a VARCHAR2, b VARCHAR2) RETURN NUMBER AS
BEGIN
   IF a = b THEN RETURN 1;
   ELSE RETURN 0;
   END IF;
END;
/

CREATE OPERATOR rownosc
   BINDING (VARCHAR2, VARCHAR2) 
   RETURN NUMBER 
   USING rowne; 
/

SELECT rownosc('aaa','aaa') FROM DUAL;