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';
有帮助吗?

解决方案

try it like this:

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

其他提示

Try this:

UPDATE
    job_list
SET 
    jobs='1' 
WHERE 
   itemId in ('12108', '12144', '12180', '12216', '12252');
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top