SQL Server using wildcard within IN

前端 未结 13 849
终归单人心
终归单人心 2020-12-02 20:07

Since I believe this should be a basic question I know this question has probably been asked, but I am unable to find it. I\'m probably about to earn my Peer Pressure badge,

13条回答
  •  悲哀的现实
    2020-12-02 20:39

    Try this

    select * 
    from jobdetails 
    where job_no between '0711' and '0713'
    

    the only problem is that job '0713' is going to be returned as well so can use '07299999999999' or just add and job_no <> '0713'

    Dan zamir

提交回复
热议问题