How can I define a parameterless constructor in an Oracle PL/SQL type? I’ve tried this:
create or replace type FooBar as object
(
constructor function FooBar() return self as result
);
...
foo_bar := FooBar();
But the empty parameter list in the type declaration raises PLS-00103.
you don’t need brackets after the name of the parameterless function
and you need a definition for the body ot the constructor: