摘要:
1.自连接 当表中存储了两层业务含义的数据,比如领导和普通员工 要把其中一种业务的数据查询出来,会使用到自连接的语法 2.内连接 from a表join b表 on 连接条件 where 过滤条件 from a表 innner join b表 on 连接条件 where 过滤条件 3.外连接 (+) 阅读全文
摘要:
1.distinct 去掉重复数据 select distinct name from user; 排重只能写在字段的前面 select id,distinct name from user sql语句前后语句必须保持一对一的关系 2.where查询 2.1 where 限制表中的行的数据返回的,满 阅读全文