-
ID:fZuS1u さんの質問

```
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 件

ID:WgCEO8 さんの回答

teratailで解決しとるぞ、見に行っとけ

ID:YUI8Gb さんの回答

inner join いるか?


  • UPDATE users SET
    users.name = social_profiles.name,
    users.introduction = social_profiles.description
    WHERE
    users.id = social_profiles.user_id

最終更新日:2016-09-07 (996 views)

関連するトピックス

ページ上部に戻る