Question

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';
Was it helpful?

Solution

try it like this:

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

OTHER TIPS

Try this:

UPDATE
    job_list
SET 
    jobs='1' 
WHERE 
   itemId in ('12108', '12144', '12180', '12216', '12252');
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top