i campi sono numerici ma mi servirebbe la stringa SQL completa

select *
from foto
where.....?????



grazie