Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sql ORA-00942:表或视图不存在00942。00000-“第;“表或视图不存在”;_Sql_Oracle - Fatal编程技术网

Sql ORA-00942:表或视图不存在00942。00000-“第;“表或视图不存在”;

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 (

这是一个使用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 (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