select a.*
from oradata a
left join (select id,detecttime from oradata where id=1)b
on datediff(second,b.detectime,a.decttime) between 0 and 10