oracle 之 using 使用
2024-08-31 13:53:08
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;
最新文章
- .net学习之CTS、CLS和CLR
- 【USACO】第一章总结
- 戴文的Linux内核专题:10配置内核(6)
- 2434: [Noi2011]阿狸的打字机 - BZOJ
- C#中判断空字符串的3种方法性能分析
- Jplayer(转)
- 【设计模式 - 1】之工厂模式(Factory)
- xml文件操作
- Codeforces 571B Minimization
- HBase的基本操作
- 最小化安装linux CentOS_7操作系统
- Android简易实战教程--第二十六话《网络图片查看器在本地缓存》
- .net core 部署在iis上
- 【原创】Linux基础之查看linux发行版以及内核版本
- python中装饰器修复技术
- Android View 深度分析requestLayout、invalidate与postInvalidate
- android 很多应用中用到的 listView + viewPager
- logstash.conf 根据不同地址创建索引
- Best Time to Buy and Sell Stock II leetcode java
- 【BZOJ4545】DQS的trie 后缀自动机+LCT
热门文章
- Mac系统docker初探
- ELK + kafka 分布式日志解决方案
- 剑指:包含min函数的栈(min栈)
- Linux shell awk中printf使用
- Linux下virtualenv与virtualenvwrapper详解
- 迁移生产环境的GItLab11.3.5到新的服务器
- Nginx 高级配置-压缩功能
- Traefik HTTPS 配置
- windows server 2008 安装MySQL 8.0 遇到报错 1055 - Expression #1 of ORDER BY clause is not in GROUP BY
- unity texture贴图纹理