left join(左联接) :返回包括左表中的所有记录和右表中联结字段相等的记录
right join(右联接) :返回包括右表中的所有记录和左表中联结字段相等的记录
inner join(等值连接): 只返回两个表中联结字段相等的行
right join(右联接) :返回包括右表中的所有记录和左表中联结字段相等的记录
inner join(等值连接): 只返回两个表中联结字段相等的行
2020-10-02
select * from
(
select a.user_name,b.timestr,b.kills
from user1 a
join user_kills b on b.user_id = a.id
order by b.kills desc, b.timestr desc
) as c
group by c.user_name
这么执行好像更快
(
select a.user_name,b.timestr,b.kills
from user1 a
join user_kills b on b.user_id = a.id
order by b.kills desc, b.timestr desc
) as c
group by c.user_name
这么执行好像更快
2020-08-31