-3

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

1 回答 1

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;
于 2013-01-24T20:19:34.000 回答