oracle  中 using关键字使用规则:

1.查询必须是等值连接。
2.等值连接中的列必须具有相同的名称和数据类型。

使用using关键字简化连接时,需要注意以下几点:
1.使用 table1表和 table2表中的字段列进行连接时,在using子句和select子句中,都不能为字段列指定表名或表别 名。
2.如果在连接查询时使用了两个表中相同的多个列,那么久可以在using子句中指定多个列名,形式如下:

select... from table1 inner join table2  using(column1,column2);

上述的语句相当于下面的语句:

select... from table1 inner join table2 on table1.column1=table2.column2 and table1.column2=table2.column2;

如果对多个表进行检索,就必须多次使用using关键字进行指定,形式如下:

select... from table1  inner join table2 using(column1)  inner join table3 using(column2);

上述的语句相当于下面的语句:

select... from table1,table2,table3  
where table1.column1=table2.column1
and table2.column2=table3.table2;

最新文章

  1. .net学习之CTS、CLS和CLR
  2. 【USACO】第一章总结
  3. 戴文的Linux内核专题:10配置内核(6)
  4. 2434: [Noi2011]阿狸的打字机 - BZOJ
  5. C#中判断空字符串的3种方法性能分析
  6. Jplayer(转)
  7. 【设计模式 - 1】之工厂模式(Factory)
  8. xml文件操作
  9. Codeforces 571B Minimization
  10. HBase的基本操作
  11. 最小化安装linux CentOS_7操作系统
  12. Android简易实战教程--第二十六话《网络图片查看器在本地缓存》
  13. .net core 部署在iis上
  14. 【原创】Linux基础之查看linux发行版以及内核版本
  15. python中装饰器修复技术
  16. Android View 深度分析requestLayout、invalidate与postInvalidate
  17. android 很多应用中用到的 listView + viewPager
  18. logstash.conf 根据不同地址创建索引
  19. Best Time to Buy and Sell Stock II leetcode java
  20. 【BZOJ4545】DQS的trie 后缀自动机+LCT

热门文章

  1. Mac系统docker初探
  2. ELK + kafka 分布式日志解决方案
  3. 剑指:包含min函数的栈(min栈)
  4. Linux shell awk中printf使用
  5. Linux下virtualenv与virtualenvwrapper详解
  6. 迁移生产环境的GItLab11.3.5到新的服务器
  7. Nginx 高级配置-压缩功能
  8. Traefik HTTPS 配置
  9. windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY
  10. unity texture贴图纹理