문제

UPDATE job_details 
    WHERE assigned AS +1 
    WHEN assigned is NULL 
    WHEN student_details.jobscope = job_details.jobscop 
    AND student_details.jobscope1 ='IT'

Is this query right? My motive is to get the assigned row in the database to (+1) each time a student is assigned to a job with a jobscope of IT.

도움이 되었습니까?

해결책

Try

UPDATE job_details 
JOIN student_details ON student_details.jobscope = job_details.jobscop
SET assigned = (assigned+1) 
WHERE  student_details.jobscope1 ='IT'
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top