有人可以告诉我为什么这个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;
答案 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;