Sql ORA-00942:表或视图不存在00942。00000-“第;“表或视图不存在”;
这是一个使用varray的小练习,但我无法检索varray表Sql ORA-00942:表或视图不存在00942。00000-“第;“表或视图不存在”;,sql,oracle,Sql,Oracle,这是一个使用varray的小练习,但我无法检索varray表 create type price_array as VARRAY(10) OF NUMBER(6,2) / create table price_table( pno int, prices price_array) / insert into price_table values (1,price_array(2.00,3.00,4.00)) / insert into price_table values (
create type price_array as VARRAY(10) OF NUMBER(6,2)
/
create table price_table(
pno int,
prices price_array)
/
insert into price_table values (1,price_array(2.00,3.00,4.00))
/
insert into price_table values (2,price_array(2.00,3.00,4.00))
/
insert into price_table values (3,price_array(2.00,3.00,4.00))
/
select * from PRICE_TABLE
/
SELECT pno, s.COLUMN_VALUE prices
from pricelist p,TABLE(p.prices) s
/
我得到的输出:
ORA-00942:表或视图不存在
94200000-“表或视图不存在”
*原因:
*行动:
第20行第6列出错
您刚刚使用了错误的表名;您的表格是price\u table
,而不是pricelist
:
SELECT pno, s.COLUMN_VALUE prices
from price_table p,TABLE(p.prices) s
/
PNO PRICES
---------- ----------
1 2
1 3
1 4
2 2
2 3
2 4
3 2
3 3
3 4
在该查询中,什么是
pricelist
——它应该是price\u table
?