SQLite Forum

Updating a value with one from another table?
Login
Also providing the same result would be:

```
update t1
   set zipcode = (
                  select zipcode
                    from t2
                   where t2.code_stat = t1.code_stat
                 )
 where code_stat in (
                     select code_stat 
                       from t2
                    )
;
```

Again, the first form UPDATE ... FROM ... will likely result in the most efficient plan.