单选题View the Exhibit and examine the structure of the ORDERS and ORDERJTEMS tables.  Evaluate the following SQL statement:   SELECT oi.order_id, product_jd, order_date   FROM order_items oi JOIN orders o   USING (order_id);   Which statement is true regard

题目
单选题
View the Exhibit and examine the structure of the ORDERS and ORDERJTEMS tables.  Evaluate the following SQL statement:   SELECT oi.order_id, product_jd, 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.


相似考题
更多“单选题View the Exhibit and examine the structure of the ORDERS and ORDERJTEMS tables.  Evaluate the following SQL statement:   SELECT oi.order_id, product_jd, order_date   FROM order_items oi JOIN orders o   USING (order_id);   Which statement is true regard”相关问题
  • 第1题:

    Examine the SQL statements that creates ORDERS table:For which columns would an index be automatically created when you execute the above SQL statement? ()

    A. SER_NO

    B. ORDER_ID

    C. STATUS

    D. PROD_ID

    E. ORD_TOTAL

    F. Composite index on ORDER_ID and ORDER_DATE


    参考答案:A, F

  • 第2题:

    Examine the data from the ORDERS and CUSTOMERS table.Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin places his orders?()

    A.

    B.

    C.

    D.


    参考答案:B

  • 第3题:

    Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables.Evaluate the SQL statement:SELECT *FROM ordersWHERE cust_id = (SELECT cust_idFROM customersWHERE cust_name = ‘Smith‘);What is the result when the query is executed?()

    A.A

    B.B

    C.C

    D.D

    E.E


    参考答案:A

  • 第4题:

    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()

    • A、SER_NO
    • B、ORDER_ID
    • C、STATUS
    • D、PROD_ID
    • E、ORD_TOTAL
    • F、composite index on ORDER_ID and ORDER_DATE

    正确答案:A,F

  • 第5题:

    Which two statements about views are true?()

    • A、A view can be created as read only.
    • B、A view can be created as a join on two or more tables.
    • C、A view cannot have an ORDER BY clause in the SELECT statement.
    • D、A view cannot be created with a GROUP BY clause in the SELECT statement.
    • E、A view must have aliases defined for the column names in the SELECT statement.

    正确答案:A,B

  • 第6题:

    The ORDERS table has these columns: ORDER_ID NUMBER(4) NOT NULL CUSTOMER_ID NUMBER(12) NOT NULL ORDER_TOTAL NUMBER(10,2) The ORDERS table tracks the Order number, the order total, and the customer to whom the Order belongs. Which two statements retrieve orders with an inclusive total that ranges between 100.00 and 2000.00 dollars? ()

    • A、SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;
    • B、SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;
    • C、SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;
    • D、SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;
    • E、SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;

    正确答案:C,E

  • 第7题:

    单选题
    The user SCOTT who is the owner of ORDERS and ORDERJTEMS tables issues the following  GRANT command:  GRANT ALL   ON orders, order_items   TO PUBLIC;   What correction needs to be done to the above statement? ()
    A

     PUBLIC should be replaced with specific usernames.

    B

     ALL should be replaced with a list of specific privileges.

    C

     WITH GRANT OPTION should be added to the statement.

    D

     Separate GRANT statements are required for ORDERS and ORDERJTEMS tables.


    正确答案: B
    解析: 暂无解析

  • 第8题:

    多选题
    Which two statements about views are true?()
    A

    A view can be created as read only.

    B

    A view can be created as a join on two or more tables.

    C

    A view cannot have an ORDER BY clause in the SELECT statement.

    D

    A view cannot be created with a GROUP BY clause in the SELECT statement.

    E

    A view must have aliases defined for the column names in the SELECT statement.


    正确答案: D,E
    解析: 暂无解析

  • 第9题:

    单选题
    EXHIBIT, Emp Table Exhibit A Exhibit B Examine the data from the EMP table. Evaluate this SQL statement: SELECT * FROM emp WHERE emp _ id = 3); WHERE commission = (SELECT commission FROM emp What is the result when the query is executed?()
    A

    Exhibit A

    B

    Exhibit B 

    C

    The query returns no rows 

    D

    The query fails because the outer query is retrieving more than one column

    E

    The query fails because both the inner and outer queries are retrieving data from the same table.


    正确答案: C
    解析: 暂无解析

  • 第10题:

    多选题
    Examine the SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL STATUS VARCHARD2(10) CHECK (status IN ('CREDIT','CASH')), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date)); For which columns would an index be automatically created when you execute the aboveSQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    Composite index on ORDER_ID and ORDER_DATE


    正确答案: C,F
    解析: 暂无解析

  • 第11题:

    单选题
    Exhibit: Examine the data in the EMPLOYEES table. Examine the subquery: SELECT last_name FROM employees WHERE salary IN (SELECT MAX(salary) FROM employees GROUP BY department_id); Which statement is true?()
    A

    The SELECT statement is syntactically accurate.

    B

    The SELECT statement does not work because there is no HAVING clause.

    C

    The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

    D

    The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


    正确答案: C
    解析: 暂无解析

  • 第12题:

    ( 难度:中等)在Hive中,以下哪个SQL语句是错误的
    A.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > LEFT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    B.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > RIGHT OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    C.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID);
    D.hive> SELECT ID, NAME, o.AMOUNT, o.DATE
    > FROM CUSTOMERS c
    > FULL OUTER JOIN ORDERS o
    > ON (ID = o.CUSTOMER_ID OR Name = o.Name);

    答案:D

  • 第13题:

    Examine the structure of the EMPLOYEES and DEPARTMENTS tables:Evaluate this SQL statement:Which SQL statement is equivalent to the above SQL statement?()

    A.

    B.

    C.

    D.


    参考答案:C

  • 第14题:

    Click the Exhibit button and examine the data in the EMPLOYEES table.Examine the subquery:SELECT last_nameFROM employeesWHERE salary IN (SELECT MAX(salary)FROM employeesGROUP BY department_id);Which statement is true?()

    A.The SELECT statement is syntactically accurate.

    B.The SELECT statement does not work because there is no HAVING clause.

    C.The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.

    D.The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.


    参考答案:A

  • 第15题:

    The user SCOTT who is the owner of ORDERS and ORDERJTEMS tables issues the following  GRANT command:  GRANT ALL   ON orders, order_items   TO PUBLIC;   What correction needs to be done to the above statement? ()

    • A、 PUBLIC should be replaced with specific usernames.
    • B、 ALL should be replaced with a list of specific privileges.
    • C、 WITH GRANT OPTION should be added to the statement.
    • D、 Separate GRANT statements are required for ORDERS and ORDERJTEMS tables.

    正确答案:D

  • 第16题:

    Examine the SQL statements that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL STATUS VARCHARD2(10) CHECK (status IN ('CREDIT','CASH')), PROD_ID_NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order id, order date)); For which columns would an index be automatically created when you execute the aboveSQL statement? ()

    • A、SER_NO
    • B、ORDER_ID
    • C、STATUS
    • D、PROD_ID
    • E、ORD_TOTAL
    • F、Composite index on ORDER_ID and ORDER_DATE

    正确答案:A,F

  • 第17题:

    You created the ORDERS table in your database by using the following code:   SQL> CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);   Then, you inserted data in the ORDERS table and saved it by issuing the following statements:SQL> INSERT INTO ORDERS VALUES(’18-AUG-00 10:26:44 PM America/New_York’);   SQL> INSERT INTO ORDERS VALUES(’23-AUG-02 12:46:34 PM America/New_York’);   SQL> COMMIT;   Next, you issued the following statement to change the time zone for the database:   SQL> ALTER DATABASE SET TIME_ZONE=’Europe/London’;   What will be the result of executing the above statement?()  

    • A、 The statement will fail.
    • B、 The statement will be executed successfully, and the new time zone will be set for the database.
    • C、 The statement will be executed successfully, but the new time zone will be set for the current session.
    • D、The statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.

    正确答案:A

  • 第18题:

    单选题
    Click the Exhibit button and examine the data from the ORDERS and CUSTOMERS tables. Which SQL statement retrieves the order ID, customer ID, and order total for the orders that are placed on the same day that Martin placed his orders?()
    A

    SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Martin' AND ord_date IN ('18-JUL-2000','21-JUL-2000');

    B

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Martin'));

    C

    SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders, customers WHERE cust_name = 'Martin');

    D

    SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');


    正确答案: D
    解析: 暂无解析

  • 第19题:

    单选题
    View the Exhibit and examine the data in ORDERS_MASTER and MONTHLYjDRDERS tables. What would be the outcome of the above statement?()
    A

     The ORDERS_MASTER table would contain the ORDERJDs 1 and 2.

    B

     The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 3.

    C

     The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 4.

    D

     The ORDERS MASTER table would contain the ORDER IDs 1, 2, 3 and 4.


    正确答案: D
    解析: 暂无解析

  • 第20题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: A,F
    解析: 暂无解析

  • 第21题:

    单选题
    You created the ORDERS table in your database by using the following code:   SQL> CREATE TABLE ORDERS (ORDER_DATE TIMESTAMP(0) WITH TIME ZONE);   Then, you inserted data in the ORDERS table and saved it by issuing the following statements:SQL> INSERT INTO ORDERS VALUES(’18-AUG-00 10:26:44 PM America/New_York’);   SQL> INSERT INTO ORDERS VALUES(’23-AUG-02 12:46:34 PM America/New_York’);   SQL> COMMIT;   Next, you issued the following statement to change the time zone for the database:   SQL> ALTER DATABASE SET TIME_ZONE=’Europe/London’;   What will be the result of executing the above statement?()
    A

     The statement will fail.

    B

     The statement will be executed successfully, and the new time zone will be set for the database.

    C

     The statement will be executed successfully, but the new time zone will be set for the current session.

    D

    The statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.


    正确答案: D
    解析: 暂无解析

  • 第22题:

    多选题
    Examine the SQL statement that creates ORDERS table: CREATE TABLE orders (SER_NO NUMBER UNIQUE, ORDER_ID NUMBER, ORDER_DATE DATE NOT NULL, STATUS VARCHAR2(10) CHECK (status IN ('CREDIT', 'CASH')), PROD_ID NUMBER REFERENCES PRODUCTS(PRODUCT_ID), ORD_TOTAL NUMBER, PRIMARY KEY (order_id, order_date)); For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    composite index on ORDER_ID and ORDER_DATE


    正确答案: F,C
    解析: 暂无解析

  • 第23题:

    多选题
    Examine the SQL statements that creates ORDERS table: For which columns would an index be automatically created when you execute the above SQL statement? ()
    A

    SER_NO

    B

    ORDER_ID

    C

    STATUS

    D

    PROD_ID

    E

    ORD_TOTAL

    F

    Composite index on ORDER_ID and ORDER_DATE


    正确答案: C,F
    解析: 暂无解析