Good afternoon, I'm having difficulty with this MySQL question:
Show the animals' names and breed code. Just show the animals that contain a prime number from 0 to 10.
I tried the following code:
SELECT nome, raca from animais where
(codigo > 0 and codigo < 10)
and (codigo % 1 = 0 and codigo % 2 = 0) or (codigo % 1 = 0 and codigo % 3 = 0) or
(codigo % 1 = 0 and codigo % 5 = 0) or (codigo % 1 = 0 and codigo % 7 = 0)
Give the following error only:
Error = {Error Response}
Well I'm solving questions from sqlweb.com.br. Here is the image of the site with the question, the answer and the error: