Question:
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)?
Answer:
You can achieve this by using the IN statement. You could say:
WHERE Department NOT IN ( 'T', 'B' )
Home » IN SQL Statement
Question:
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)?
Answer:
You can achieve this by using the IN statement. You could say:
WHERE Department NOT IN ( 'T', 'B' )
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.