120.View the Exhibits and examine the structures of the PRODUCTS, SALES, and CUSTOMERS
tables.
You issue the following query:
SQL>SELECT p.prod_id,prod_name,prod_list_price,quantity_sold,cust_last_name
FROM products p NATURAL JOIN sales s NATURAL JOIN customers c
WHERE prod_id =148;
Which statement is true regarding the outcome of this query?
A.It executes successfully.
B.It produces an error because the NATURAL join can be used only with two tables.
C.It produces an error because a column used in the NATURAL join cannot have a qualifier.
D.It produces an error because all columns used in the NATURAL join should have a qualifier.
答案:C
解析:natural join,这个连接会将认为表中相同字段名的列相等(类型可以不等),因此它认为,通过列名就可以找出是哪个表,因此列前边也不能增加前缀,不管是在select还是
where中
tables.
You issue the following query:
SQL>SELECT p.prod_id,prod_name,prod_list_price,quantity_sold,cust_last_name
FROM products p NATURAL JOIN sales s NATURAL JOIN customers c
WHERE prod_id =148;
Which statement is true regarding the outcome of this query?
A.It executes successfully.
B.It produces an error because the NATURAL join can be used only with two tables.
C.It produces an error because a column used in the NATURAL join cannot have a qualifier.
D.It produces an error because all columns used in the NATURAL join should have a qualifier.
答案:C
解析:natural join,这个连接会将认为表中相同字段名的列相等(类型可以不等),因此它认为,通过列名就可以找出是哪个表,因此列前边也不能增加前缀,不管是在select还是
where中