Pregunta

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.

¿Fue útil?

Solución

Try

UPDATE job_details 
JOIN student_details ON student_details.jobscope = job_details.jobscop
SET assigned = (assigned+1) 
WHERE  student_details.jobscope1 ='IT'
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top