• I would never rely on a trick based on a particular feature of the data which wasn't relevant to the selection. In my opinion, this is extremely bad practice.

    As written, the selection data does satisfy the requirement that all the months (when displayed in English) have an even number of characters. But this is a mere coincidence. If the requirements change so that the user wants 'March' instead 'February', then someone's got to go and find all those obscure selection clauses and change them to the way they should have been in the first place, since the 'cute trick' doesn't work any more.

    I, along with may others, answer YES because of the technical reason that you can always avoid an IN (or OR) by using a JOIN. For example:select *

    from stud_mast s

    join ( select 2 as mth union all

    select 6 union all

    select 7 union all

    select 8 union all

    select 11 union all

    select 12) req

    on month(s.dob) = req.mth

    Of course, an even better way would be to put the required months in a table so that a future update just requires adding, deleting or changing records and you don't have to alter the code at all!

    select *

    from stud_mast s

    join req_month_table r

    on month(s.dob) = r.mth

    Derek