Can I somehow get a pseudonym for the built-in type indicating the maximum length?
So that I can declare variables wrong
myvar number(3); and so
myvar mynumber; And also attributes in the object type, like this
create or replace type myobject as object ( myattribute mynumber ); I know one way - get a table with a column of the desired type.
create table mytable (mynumber number(3)); Now you can declare variables
myvar mytable.mynumber%type; But this is fu, how ugly. Especially, an empty table, dangling in the list of normal.
And also this method is not suitable for declaring the type of attributes in the object type. The compiler will generate an error.
Error: PLS-00329: type at schema level has invalid reference to ...