How to combine not like and like? Using MariadB, how can I combine NOT LIKE and LIKE, so that I can search for the string FHD but exclude from the searches if the string H265 is also present?

This didn't work for me:

SELECT  `id` FROM `qualities`.`streams` WHERE quality LIKE '%FHD%' AND NOT LIKE '%H265%';
You probably got an error like Incorrect syntax near the keyword LIKE, because each of the ("NOT LIKE" and "LIKE") conditions needs to specify the column is is working on. If so, this should work:

SELECT  `id` FROM `qualities`.`streams` WHERE quality LIKE '%FHD%' AND quality NOT LIKE '%H265%';