Frage

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';
War es hilfreich?

Lösung

try it like this:

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

Andere Tipps

Try this:

UPDATE
    job_list
SET 
    jobs='1' 
WHERE 
   itemId in ('12108', '12144', '12180', '12216', '12252');
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top