日期:2014-05-18 浏览次数:20606 次
create function account_count(@customer_name char(20))
returns integer
as begin
declare @a_count integer;
select count(*) into @a_count --不知错在哪里了
from depositor
where depositor.customer_name=@customer_name
return @a_count;
end
create function account_count(@customer_name char(20))
returns integer
as begin
declare @a_count integer;
select @a_count=count(*) --不是oracle 不能那样给变量赋值
from depositor
where depositor.customer_name=@customer_name
return @a_count;
end