Can there be multiple conditions in a query?


#1

Question

Can there be multiple conditions in a query?

Answer

Yes, it is possible to implement multiple conditions on one query if necessary, the most commonly used ones would be AND and OR so if we were to check for an article’s title on a magazine table to narrow down on author, subject, date, and characters length, we could say:

SELECT title FROM Magazine 
WHERE author = 'Axel Kaban'
AND subject = 'SQL' 
AND date = '12/3/18'
OR date = '12/1/18'
AND char_length > 3000;