select adduser.name as adduser,
edituser.name as edituser,
deluser.name as deluser
from table as t
join users as adduser
on t.adduser_id = adduser.id
join users as edituser
on t.edituser_id = edituser.id
join users as deluser
on t.deluser_id = deluser.id
SELECT ua.name as adduser,
ue.name as edituser,
ud.name as deleteuser
FROM Table t
JOIN Users ua on t.adduser_id = ua.id
JOIN Users ue on t.edituser_id = ue.id
JOIN Users ud on t.deleteuser_id = ud.id;
2条答案
按热度按时间gopyfrb31#
可以使用不同的别名联接同一个表。
字符串
arknldoa2#
字符串