Let us say your table column names are Empid, Fromdate, todate
then
create proc sp_saveleave
(@empid int,
@from datetime,
@to datetime)
as
begin
declare @count int
select @count=count(1) from tbl_leave where empid=@empid
and (@from between fromdate and todate or @to between fromdate and todate)
if @count>0
print 'already applied leave for one or more days in the same period'
else
insert into tbl_leave values(@empid,@from,@to)
end