ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000 04-AUG- 108 10 8000
ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000
ORD_ID ORD_DATE CUST_ID ORD_TOTAL 04-AUG- 108 10 8000
The query fails because the subquery returns more than one row.
The query fails because the outer query and the inner query are using different tables.
第1题:
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.
第2题:
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? ()
第3题:
现有客户表customers(主键:客户编号cid),包含10行数据,订单表orders(外键:客户编号cid),包含6条数据。执行sql语句:select * from customers right outer join orders on customers.cid=orders.cid。最多返回()条记录。
第4题:
From SQL*Plus, you issue this SELECT statement: SELECT* FROM order; You use this statement to retrieve data from a data table for ().
第5题:
SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;
SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;
第6题:
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.
第7题:
ALTER TABLE OrdersDISABLE TRIGGER trg InsertOrders
DROP TRIGGER trg InsertOrders
DISABLE TRIGGER trg InsertOrders ON Orders
ALTER TRIGGER trg InsertOrders ON Orders NOT FOR REPLICATION
第8题:
SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Mating' 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');
第9题:
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');
第10题:
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status NUMBER(10) DEFAULT 'PENDING', date_ordered DATE );
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
CREATE OR REPLACE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) = 'PENDING', date_ordered DATE );
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered DATE );
CREATE TABLE orders ( order_id NUMBER(10), customer_id NUMBER(8), order_status VARCHAR2(10) DEFAULT 'PENDING', date_ordered VARCHAR2 );
第11题:
Updating
Viewing
Deleting
Inserting
Truncating
第12题:
SELECT ord_id, cust_id, ord_total FROM orders, customers WHERE cust_name='Mating' 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');
第13题:
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
第14题:
Your company uses a SQL Server 2005 database. This database contains a trigger named trg_InsertOrders, which fires when order data is inserted into the Orders table. The trigger is responsible for ensuring that a customer exists in the Customers table before data is inserted into the Orders table. You need to configure the trigger to prevent it from firing during the data import process. You must accomplish this goal while using the least amount of administrative effort. Which two Transact-SQL statements can you use to achieve this goal?()
第15题:
假设订单表orders用来存储订单信息,cid代表客户编号,money代表单次订购额,现要查询每个客户的订购次数和每个客户的订购总金额,下面()sql语句可以返回正确结果。
第16题:
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.
第17题:
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.
第18题:
displaying the total order value for sales representatives 161 and 163
displaying the order total for sales representative 161 in the year 1999
displaying the number of orders that have order mode online and order date in 1999
displaying the number of orders whose order total is more than the average order total for all online orders
第19题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
Composite index on ORDER_ID and ORDER_DATE
第20题:
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit DESC
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_credit_limit NULLS LAST
SELECT cust_last_name, cust_credit_limit FROM customers ORDER BY cust_last_name, cust_credit_limit NULLSLAST
第21题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
composite index on ORDER_ID and ORDER_DATE
第22题:
ALTER TABLE OrdersDISABLE TRIGGER trg_InsertOrders
DROP TRIGGER trg_InsertOrders
DISABLE TRIGGER trg_InsertOrders ON Orders
ALTER TRIGGER trg_InsertOrders ON Orders NOT FOR REPLICATION
sp_settriggerorder@triggername= 'trg_InsertOrders', @order='None'
第23题:
SELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;
SELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and <= 2000;
SELECT customer_id, order_id, order_total FROM orders WHERE order_total>= 100 and order_total <= 2000;
第24题:
SER_NO
ORDER_ID
STATUS
PROD_ID
ORD_TOTAL
Composite index on ORDER_ID and ORDER_DATE