declare @starttime as datetime declare @endtime as datetime set @starttime = '2009-11-24 15:10:00' set @endtime = '2009-11-24 15:12:24' )+':'+ )+':'+ ) as TimeEd 定义为函数 create FUNCTION [f_TimeBetween] ( @start datetime, @end datetime ) ) AS BEGIN )+':…