0
我做了這個功能,但是當我執行它時會返回一個錯誤!如何做一個函數從pl/sql中的表中返回行類型?
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'不是一個過程或者是未定義的 – Sara
您正在使用SQL Server或Oracle。 Oracle是Pl \ SQL和SQL Server是T-SQL –