The statement would not execute because table aliases are not allowed in the JOIN clause.
The statement would not execute because the table alias prefix is not used in the USING clause.
The statement would not execute because all the columns in the SELECT clause are not prefixed with table aliases.
The statement would not execute because the column part of the USING clause cannot have a qualifier in the SELECT list.
第1题:
A. SER_NO
B. ORDER_ID
C. STATUS
D. PROD_ID
E. ORD_TOTAL
F. Composite index on ORDER_ID and ORDER_DATE
第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.
第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
第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? ()
第5题:
Which two statements about views are true?()
第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? ()
第7题:
PUBLIC should be replaced with specific usernames.
ALL should be replaced with a list of specific privileges.
WITH GRANT OPTION should be added to the statement.
Separate GRANT statements are required for ORDERS and ORDERJTEMS tables.
第8题:
The statement would not execute because table aliases are not allowed in the JOIN clause.
The statement would not execute because the table alias prefix is not used in the USING clause.
The statement would not execute because all the columns in the SELECT clause are not prefixed with table aliases.
The statement would not execute because the column part of the USING clause cannot have a qualifier in the SELECT list.
第9题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
composite index on ORDER_ID and ORDER_DATE
第10题:
The statement will fail.
The statement will be executed successfully, and the new time zone will be set for the database.
The statement will be executed successfully, but the new time zone will be set for the current session.
The statement will be executed successfully, but the new time zone will neither be set for the database nor for a specific session.
第11题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
composite index on ORDER_ID and ORDER_DATE
第12题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
Composite index on ORDER_ID and ORDER_DATE
第13题:
A.
B.
C.
D.
第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.
第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? ()
第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? ()
第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?()
第18题:
SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Martin' AND ord_date IN ('18-JUL-2000','21-JUL-2000');
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'));
SELECT ord_id, cust_id, ord_total FROM orders WHERE ord_date IN (SELECT ord_date FROM orders, customers WHERE cust_name = 'Martin');
SELECT ord_id, cust_id, ord_total FROM orders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');
第19题:
The ORDERS_MASTER table would contain the ORDERJDs 1 and 2.
The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 3.
The ORDERS_MASTER table would contain the ORDERJDs 1, 2 and 4.
The ORDERS MASTER table would contain the ORDER IDs 1, 2, 3 and 4.
第20题:
A view can be created as read only.
A view can be created as a join on two or more tables.
A view cannot have an ORDER BY clause in the SELECT statement.
A view cannot be created with a GROUP BY clause in the SELECT statement.
A view must have aliases defined for the column names in the SELECT statement.
第21题:
Exhibit A
Exhibit B
The query returns no rows
The query fails because the outer query is retrieving more than one column
The query fails because both the inner and outer queries are retrieving data from the same table.
第22题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
Composite index on ORDER_ID and ORDER_DATE
第23题:
The SELECT statement is syntactically accurate.
The SELECT statement does not work because there is no HAVING clause.
The SELECT statement does not work because the column specified in the GROUP BY clause is not in the SELECT list.
The SELECT statement does not work because the GROUP BY clause should be in the main query and not in the subquery.
第24题:
( 难度:中等)在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