mysql怎么写一个带输入输出参数的自定义函数
功能就像:
use studentRegisterManager
go
create function differentTime(@section_id varchar(10),@currenttime datetime)
returns int
as
begin
declare @different int
declare @time datetime
set @time = (select section_set_time from [section] where section_id=@section_id)
set @different=DATEDIFF( d, @time,@currenttime)
return @different
end
一样