OCP-047 USING ORA-25154: USING 子句的列部分不能有限定词

当尝试使用JOIN子句结合USING(order_id)从orders和order_items表中选择数据时,会遇到ORA-25154错误,提示USING子句的列部分不能有限定词。尝试的不同SELECT语句都导致了相同的错误,即使在SELECT列表中省略表别名或完全省略别名。
摘要由CSDN通过智能技术生成

34. View the Exhibit and examine the structure of the ORDERS and ORDER_ITEMS
tables. Evaluate the following SQL statement:
SELECT oi.order_id, product_id, order_date
FROM order_items oi JOIN orders o USING(order_id).
Which statement is true regarding the execution of this SQL statement?
A. The statement would not execute because table aliases are not allowed in
the JOIN clause.
B. The statement would not execute because the table alias prefix is not used
in the USING clause.
C. The statement would not execute because all the columns in the SELECT
clause are not prefixed with table aliases.
D. The statement would not execute because the column part of the USING clause
cannot have a qualifier in the SELECT list.
Answer: D


SQL> SELECT oi.order_id, o.product_id, order_date
  2  FROM orders oi JOIN order_items o

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值