Chinaunix首页 | 论坛 | 博客
  • 博客访问: 59929
  • 博文数量: 38
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 396
  • 用 户 组: 普通用户
  • 注册时间: 2015-07-12 14:46
文章分类

全部博文(38)

文章存档

2016年(11)

2015年(27)

我的朋友
最近访客

分类: Mysql/postgreSQL

2016-06-20 20:46:08

内连接:
    select student.*,grade.* from student join grade where student.sid=grade.sid;
    select s.*,g.* from student as s join grade as g where s.sid=g.sid;



外连接:
    左连接(左边的主,左边的数据多有)
    select * from student left join grade on student.sid=grade.sid;
    右连接
    select * from student right join grade on student.sid=grade.sid;

阅读(515) | 评论(0) | 转发(0) |
0

上一篇:python collections系列

下一篇:mysql缓存参数

给主人留下些什么吧!~~