Oracle - PL SQL编译错误

时间:2013-01-24 20:03:13

标签: oracle

有人可以告诉我为什么这个PSQL会出现编译错误吗?

set serveroutput on
Create or replace function get_warehouse_location(Name in Customer.Name%type)
return w.location %type as
wLocation     warehouse.Location %type;
begin
select warehouse.location 
into wLocation
from Customer c, Warehouse w
where cName= 'Finch'
and warehouse.address='       ';
return (Location);
end;

1 个答案:

答案 0 :(得分:0)

至少在调用类型方面存在问题。应该是table.field%TYPE。没有空格。

set serveroutput on
Create or replace function get_warehouse_location(Name in Customer.Name%type)
return w.location%type as
wLocation     warehouse.Location%type;
begin
select warehouse.location 
into wLocation
from Customer c, Warehouse w
where cName= 'Finch'
and warehouse.address='       ';
return (Location);
end;
相关问题