多表查询,内连接(隐式、显示),外连接(左外、右外、基础表)
隐式内连接:select user_name as ‘昵称’,gname as ‘游戏名称’,score as ‘分数’
from users,games,scores
where users.user_qq=scores.user_qq
and games.gno=scores.gno
from子句后面直接出现多个表名,这种连接方式即属于内连接,是隐式连接
显式内链接:select col_list from table1 inner join table2 on table1.col=table2.co
原创
2021-04-06 19:59:20 ·
1889 阅读 ·
0 评论