sql update table where id in another table