标签:
例如:
表xuesheng
id name
1, Jack
2, Tom
3, Kity
4, nono
表kaoshi
id grade
1, 56
2, 76
11, 89
内连接(显示两表匹配的id)
select stu.id, exam.id, stu.name, exam.grade from xuesheng stu inner join kaoshi exam on stu.id = exam.id
结果如下
1 1 Jack 56
2 2 Tom 76
标签:
原文地址:http://www.cnblogs.com/beijingstruggle/p/4981215.html