各位高手
   帮帮忙啊。。
   小弟想了一下午了

解决方案 »

  1.   

    if exists(select 1 from ta where @dt between s and e) 
       print ''
    else
       print ''
      

  2.   

    IF EXISTS(SELECT * FROM TB WHERE TIME BETWEEN STRATTIME AND ENDTIME)?
      

  3.   

    if exists(.....)
    print '存在'
      

  4.   

    if exists(select 1 from tb where 时间 between 开始时间 and 结束时间) 
      print '存在' 
    else 
      print '不存在'
      

  5.   

    create proc k 
    @dt datetime 
    as
    if exists(select * from tb where DATEDIFF(DAY,@dt,日期字段)=0) 
    print '已经存在'
    else 
    print '不存在'