• You should not use or as per the question but you can use 'and'. So we can build a negative logic like this:

    select * from std_tab

    where datename(m, dob) <> 1 and datename(m, dob) <> 3 and so on...

    Regards,

    -Aazad.