PL/SQL (MOSC)

MOSC Banner

Object type declaration with "%TYPE"

edited Apr 4, 2011 11:24PM in PL/SQL (MOSC) 3 commentsAnswered
 Hello everybody !
I have a question relative to types creation.
I do not see any restriction on Oracle documentation, but i cannot declare objects with reference to the types of columns from my schema.
Any idea of how such declaration is possible ?

Thank you very much,
Catherine

TestCase :

SQL> create table test (a number);

Table créée.

SQL> drop type obj_test;

Type abandonné.

SQL> create type obj_test as object(a number);
 /

Type créé.

SQL> create or replace type obj_test as object(a obj_test.a%type);
/

Avertissement : Type créé avec erreurs de compilation.

SQL> sho err
Erreurs pour TYPE OBJ_TEST :

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center