您的位置:首页 > 数据库 > MySQL

mysql查询方式

2016-04-07 13:27 351 查看
最近查询的时候总是把内联查询和关联查询弄混,抽时间了查了下,希望对我也对你们有帮助
一‘ mysql查询方式
例如现在有两张表(score,student)
1. mysql的三种'关联'查询方式
select * from score,student where score.id = student.id
select * from score join student on score.id = student.id
select * from score join student using(id)

2. mysql子查询方式
select * from score where id = (select * from student where id = '1')

3. mysql内联查询
select * from score a,student b where a.id = b.id
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  内联 关联 子查询