74. View the Exhibit and examine the structure of the ORDER_ITEMS and ORDERS
tables.
You are asked to retrieve the ORDER_ID, PRODUCT_ID, and total price
(UNIT_PRICE multiplied by QUANTITY), where the total price is greater than
50,000.
You executed the following SQL statement:
SELECT order_id, product_id, unit_price*quantity "Total Price"
FROM order_items
WHERE unit_price*quantity > 50000 NATURAL JOIN orders;
Which statement is true regarding the execution of the statement?
A. The statement would execute and provide the desired result.
B. The statement would not execute because the ON keyword is missing in the
NATURAL JOIN clause.
C. The statement would not execute because the WHERE clause is before the
NATURAL JOIN clause.
D. The statement would not execute because the USING keyword is missing in
the NATURAL JOIN
clause.
Answer: C
1: SQL> select deptno,ename from dept natural join emp where deptno>30;
Ok
2: SQL> select deptno,ename from dept where deptno>30 natural join emp;
ORA-00933: SQL 命令未正确结束
自然连接(NATURAL JOIN)是一种特殊的等价连接,它将表中具有相同名称的列
自动进行记录匹配。自然连接不必指定任何同等连接条件。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/11312660/viewspace-718853/
,如需转载,请注明出处,否则将追究法律责任。