我在下面有这个 sql 查询,注意receiver
从 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 中添加了一个子查询,但这给了我一个语法错误:(