```
update users
set
users.name = social_profiles.name,
users.introduction = social_profiles.description
from
users
inner join social_profiles
on users.id = social_profiles.user_id
;
```
fromで怒られるのですがなんでですか..........
```
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ’FROM
users
inner join social_profiles
on users.id = social_profiles.user_id’ at line 5
```
みんなの回答 2 件
teratailで解決しとるぞ、見に行っとけ
inner join いるか?
UPDATE users SET
users.name = social_profiles.name,
users.introduction = social_profiles.description
WHERE
users.id = social_profiles.user_id
関連するトピックス