功能就如:
use studentRegisterManager
go
create function differentTime(section_id varchar(10),currenttime datetime)
returns int
begin
declare different int,
declare ttime datetime,
set ttime = (select section_set_time from [section] where section_id=@section_id)
set different=DATEDIFF( d, @time,@currenttime)
return different
end
一样