Pregunta

I have the below query to update my navicat table. However, I'm getting an error. It is giving me "Unknown System Variable 'jobs'", but one of my columns is actually named 'jobs'...I don't understand why it wont update it. Am I missing something in this query?

    UPDATE job_list

    SET jobs='1' WHERE itemId='12108';
    SET jobs='1' WHERE itemId='12144';
    SET jobs='1' WHERE itemId='12180';
    SET jobs='1' WHERE itemId='12216';
    SET jobs='1' WHERE itemId='12252';
¿Fue útil?

Solución

try it like this:

UPDATE job_list SET jobs='1' WHERE itemId in ('12108','12144','12180','12216','12252');

Otros consejos

Try this:

UPDATE
    job_list
SET 
    jobs='1' 
WHERE 
   itemId in ('12108', '12144', '12180', '12216', '12252');
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top