receiver
私は以下のこのSQLクエリを持っています、からIDで戻るフィールドに注意してくださいtable_1
私の質問は、どのようにして受信機FirstName
をLastName
そのreceiver
場で入手するのかということです。
SELECT DISTINCT
FirstName,
LastName,
table_2.status,
(select FirstName, LastName from table_1 where table_1.id = table_2.receiver) as receiver
FROM table_1
INNER JOIN
table_2 on table_1.key_2 = CONCAT('OFFLINE-', table_2.id)
ORDER BY FirstName, LastName
SQLにサブクエリを追加しましたが、構文エラーが発生します:(