Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can I create record as schema level?

unknown-879931Jun 14 2015 — edited Jun 14 2015

Hi All,

When I try to create record as schema level, I get error. So, isn't it SQL type?

create or replace type rec_t is record

(

col1 number,

col2 number

);

My second question is, why I cannot create table rowtype when I create collection as below?

create table test_table

(

id number primary key,

txt varchar2(5)

);

create or replace type my_arr is table of test_table%rowtype;

  • Error(1,25): PLS-00329: schema-level type has illegal reference to HR.TEST_TABLE

Thanks in advance

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 13 2015
Added on Jun 14 2015
8 comments
2,007 views