IN SQL Statement

I have department codes like this: T, B, P, O, Q, etc. How can I find T only, B only, or others only (excluding T and B)?

You can achieve this by using the IN statement. You could say:

 WHERE Department NOT IN ( 'T', 'B' )

Share the Post:
Share on facebook
Share on twitter
Share on linkedin


Recent Articles: