【发布时间】:2016-04-07 18:38:02
【问题描述】:
我做了这个函数,但是当我执行它时它返回一个错误!
create or replace function get_accounts
(Acc_id in Account1.account_id%Type)
return account1%rowtype
as
l_cust_record account1%rowtype;
begin
select * into l_cust_record from account1
where account_id=Acc_id;
return(l_cust_record);
end;
/
【问题讨论】:
-
你是如何执行它的?错误是什么?
-
执行 Get_Accounts(account_id);这是错误 PLS-00221: 'GET_ACCOUNTS' is not an procedure or is undefined
-
您使用的是 SQL Server 还是 Oracle。 Oracle 是 Pl\SQL,SQL Server 是 T-SQL
-
我删除了
sql-server标签,因为这显然是PL/SQL -
我用的是OracleSQL Developer,我只是一个初学者,希望你能帮助我