在oracle中,using用于简化连接查询,只有当查询是等值连接和连接中的列必须具有相同的名称与数据类型时,才能使用using关键字进行简化。

本教程操作环境:Windows10系统、Oracle 11g版、Dell G3电脑。
oracle中using的用法是什么
oracle 中 using关键字使用规则:
1.查询必须是等值连接。
2.等值连接中的列必须具有相同的名称和数据类型。
使用using关键字简化连接时,需要注意以下几点:
1.使用 table1表和 table2表中的字段列进行连接时,在using子句和select子句中,都不能为字段列指定表名或表别 名。
自从百度屏蔽淘宝客网站、淘宝抛弃淘宝客之后,个人站长集体陷入了恐慌之中。此时,什么值得买网的异军突起引起了广大个人站长的极大关注。做一个什么值得买一样的导购网站成了众多个人站长的一致心愿! TP-COUPON 导购系统 即是让个人站长实现此心愿的绝佳选择! 欢迎个人站长选用。V1.1版 更新记录:1.修正请求时查询淘宝店铺错误的bug2.删除一些无用的代码
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;
推荐教程:《Oracle视频教程》









