) 我希望在一堆连接的顶部从同一个表中选择两行,但我不确定到底该怎么做。这是我当前的选择语句:
SELECT m_table.*, t_people.name as boxer_name, t_people.class, t_people.age, t_people.sex, m_time.time, m_time.rounds, t_age.name as age_name, teams.name as team_name
FROM m_table
INNER JOIN t_people ON t_people.id = m_table.red_id
INNER JOIN m_time ON (m_time.age = t_people.age AND m_time.sex = t_people.sex OR m_time.age = t_people.age AND m_time.sex = 'u')
INNER JOIN t_age ON t_age.id = t_people.age
INNER JOIN teams ON teams.id = t_people.team_id
我希望从 t_people 表中提取两个人。
编辑 正如您在上面看到的,我正在使用 m_table.red_id 提取一个并且我希望使用 m_table.blue_id 选择另一 行
应该如何处理?