Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

MySQL can’t specify target table for update in FROM clause (Updating same table from same select inner join table)

UPDATE film 
SET film.language_id = 2
WHERE film.film_id IN (SELECT f.film_id 
					FROM film f
					INNER JOIN film_actor fa
					ON f.film_id = fa.film_id
					WHERE fa.actor_id = 12);
 
PREVIOUS NEXT
Tagged: #MySQL #target #table #update #FROM #clause #table #select #join
ADD COMMENT
Topic
Name
1+1 =