سؤال

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