Examine the data from the ORDERS and CUSTOMERS tables. ORDERS ORD_ID ORD_DATE CUST_ID 12-JAN- 100 15 10000 09-MAR- 101 40 8000 09-MAR- 102 35 12500 15-MAR- 103 15 12000 25-JUN- 104 15 6000 18-JUL- 105 20 5000 106 18-JUL- 35 7000 21-JUL- 107 20 6500 04-AUG- 109 10 8000 CUSTOMERS CUST_ID CUST_NAME CITY 10 Smith Los Angeles 15 Bob San Francisco 20 Martin Chicago 25 Mary New York 30 Rina Chicago 35 Smith New York 40 Lind New York Evaluate the SQL statement: SELECT * FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Smith'); What is the result when the query is executed?()A、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000 04-AUG- 108 10 8000B、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000C、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 04-AUG- 108 10 8000D、The query fails because the subquery returns more than one row.E、The query fails because the outer query and the inner query are using different tables.
Examine the data from the ORDERS and CUSTOMERS tables. ORDERS ORD_ID ORD_DATE CUST_ID 12-JAN- 100 15 10000 09-MAR- 101 40 8000 09-MAR- 102 35 12500 15-MAR- 103 15 12000 25-JUN- 104 15 6000 18-JUL- 105 20 5000 106 18-JUL- 35 7000 21-JUL- 107 20 6500 04-AUG- 109 10 8000 CUSTOMERS CUST_ID CUST_NAME CITY 10 Smith Los Angeles 15 Bob San Francisco 20 Martin Chicago 25 Mary New York 30 Rina Chicago 35 Smith New York 40 Lind New York Evaluate the SQL statement: SELECT * FROM orders WHERE cust_id = (SELECT cust_id FROM customers WHERE cust_name = 'Smith'); What is the result when the query is executed?()
- A、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000 04-AUG- 108 10 8000
- B、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 09-MAR- 102 35 12500 18-JUL- 106 35 7000
- C、ORD_ID ORD_DATE CUST_ID ORD_TOTAL 04-AUG- 108 10 8000
- D、The query fails because the subquery returns more than one row.
- E、The query fails because the outer query and the inner query are using different tables.
相关考题:
设有订单表order(其中包含字段:订单号,客户号,职员号,签订日期,金额),查询2007年所签订单的信息,并按金额降序排序,正确的SQL命令是( )。A.SELECT * FROM order WHERE YEAR(签订日期)=2007 ORDER BY 金额 DESCB.SELECT * FROM order WHILE YEAR(签订日期)=2007 ORDER BY 金额 ASCC.SELECT * FROM order WHERE YEAR(签订日期)=2007 ORDER BY 金额 ASCD.SELECT * FROM order WHILE YEAR(签订日期)=2007 ORDER BY 金额 DESC
You need to dump the data from the master server and import it into a new slave server.Which mysqldump option can be used when dumping data from the master server in order to include the master server‘s binary log information?()A.Include-master-infoB.Master-binlogC.Include-log-fileD.Master-data
Examine the data from the ORDERS and CUSTOMERS tables.Evaluate the SQL statement:What is the result when the query is executed?() A.B.C.D. The query fails because the subquery returns more than one row.E. The query fails because the outer query and the inner query are using different tables.
Examine the following scenario:The target database instance is running. The most recent backup available for the target database was taken two days ago. Log files switches have occurred in last two days. The target database is duplicated on the same host, using the Recovery Manager (RMAN) duplicate command as follows:Which statement is true about the duplicate database in this scenario?()A. It contains data till the last backupB. It contains all data from target database until the current timeC. It contains all data from only the committed transactions in the target databaseD. It contains all data except that which is used by the transactions in the current online redo file of target database
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.
Click the Exhibit button and examine the data from the EMP table.The COMMISSION column shows the monthly commission earned by the employee.Which two tasks would require subqueries or joins in order to be performed in a single step? ()A.listing the employees who earn the same amount of commission as employee 3B.finding the total commission earned by the employees in department 10C.finding the number of employees who earn a commission that is higher than the average commission of the companyD.listing the departments whose average commission is more than 600E.listing the employees who do not earn commission and who are working for department 20 in descending order of the employee IDF.listing the employees whose annual commission is more than 6000
You have a server that runs Windows Server 2003 Service Pack 2 (SP2).An incremental backup runs every weekday at 01:00. On Friday, you examine the Windows Backup log anddiscover that the last entry in the log is one week old.You need to identify the problem that prevents the backup from running.What should you do? ()A. From Scheduled Tasks, examine the log.B. From Event Viewer, examine the system log.C. From Windows Backup, enable detailed logging and then perform a manual backup.D. From Windows Explorer, examine the files in the %systemroot%\system32\LogFiles folder.
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.AB.BC.CD.DE.E
Which three statements are true regarding subqueries?()A、Subqueries can contain GROUP BY and ORDER BY clauses B、Main query and subquery can get data from different tables C、Main query and subquery must get data from the same tables D、Subqueries can contain ORDER BY but not the GROUP BY clause E、Only one column or expression can be compared between the main query and subqueryF、 Multiple columns or expressions can be compared between the main query and subquery
对由SELECT--FROM—WHERE—GROUP--ORDER组成的SQL语句,其在被DBMS处理时,各子句的执行次序为()A、SELECT—FROM—GROUP—WHERE—ORDERB、FROM--WHERE——GROUP——ORDER——SELECTC、FROM——WHERE——GROUP——SELECT——ORDERD、SELECT——FROM——WHERE——GROUP——ORDER
下面哪条语句可以取出薪水最高的前三个人:()A、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY );B、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY ) WHERE ROWNUM=3;C、SELECT * FROM (SELECT * FROM EMPLOYEES ORDER BY SALARY DESC) WHERE ROWNUM=3;D、SELECT * FROM EMPLOYEES WHERE ROWNUM=3 ORDER BY SALARY DESC;
When a staging server is used as an environment for testing new data in a default WebSphere Commerce installation, which of the following are true about the staging server?()A、The database has a subset of the tables in the production server database.B、The database has a copy of selected data from the production databaseC、The database logs changes for later propagation.D、The database is accessed as read-only to prevent data corruption.E、The database includes all user and order data for offline processing.
From SQL*Plus, you issue this SELECT statement: SELECT* FROM order; You use this statement to retrieve data from a data table for ().A、UpdatingB、ViewingC、DeletingD、InsertingE、Truncating
You need to dump the data from the master server and import it into a new slave server. Which mysqldump option can be used when dumping data from the master server in order to include the master server's binary log information?()A、Include-master-infoB、Master-binlogC、Include-log-fileD、Master-data
The order entry department requested a report to display the average time to enter an order from each order entry clerk sorted by supervisor with a group average after viewing the report users requested to bold the value for each supervisors group average. Where would you make this change?()A、In the template used. B、In the data model. C、In the life previewer. D、In the field property palette.
You are creating a Windows Communication Foundation (WCF) service to process orders.The data contract for the order is defined as follows:[DataContract]public class Order{ [DataMember] public string CardHolderName { get; set; } [DataMember] public string CreditCardNumber { get; set; }}You have the following requirements: Enable the transmission of the contents of Order from the clients to the service. Ensure that the contents of CreditCardNumber are not sent across the network in clear text. Ensure that the contents of CreditCardNumber are accessible by the service to process the order.You need to implement the service to meet these requirements. What should you do?()A、Add a DataProtectionPermission attribute to the CreditCardNumber property and set the ProtectData property to true.B、Convert the DataContract to a MessageContract and set the ProtectionLevel property to SignAndEncrypt.C、Change the data type of CreditCardNumber from string to SecureString.D、Implement the CreditCardNumber property getter and setter In the setter, run the value of the CreditCardNumber through the MD5CryptoServiceProvider class TransformBlock method.
多选题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? ()ASELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;BSELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;CSELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;DSELECT customer_id, order_id, order_total FROM orders WHERE order_total= 100 and = 2000;ESELECT customer_id, order_id, order_total FROM orders WHERE order_total= 100 and order_total = 2000;
单选题The order entry department requested a report to display the average time to enter an order from each order entry clerk sorted by supervisor with a group average after viewing the report users requested to bold the value for each supervisors group average. Where would you make this change?()AIn the template used. BIn the data model. CIn the life previewer. DIn the field property palette.
多选题When a staging server is used as an environment for testing new data in a default WebSphere Commerce installation, which of the following are true about the staging server?()AThe database has a subset of the tables in the production server database.BThe database has a copy of selected data from the production databaseCThe database logs changes for later propagation.DThe database is accessed as read-only to prevent data corruption.EThe database includes all user and order data for offline processing.
单选题设有订单表order(其中包含字段:订单号,客户号,职员号,签订日期,金额),查询2007年所签订单的信息,并按金额降序排序,正确的SQL命令是( )。ASELECT * FROM order WHERE YEAR(签订日期)=2007 ORDER BY金额DESCBSELECT * FROM order WHILE YEAR(签订日期)=2007 ORDER BY金额ASCCSELECT * FROM order WHERE YEAR(签订日期)=2007 ORDER BY金额ASCDSELECT * FROM order WHILE YEAR(签订日期)=2007 ORDER BY金额DESC
单选题Which files must be synchronized in order for a database to start?()Atemp filesBonline data filesCoffline data filesDread only data files
单选题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 FROMorders WHERE cust_id IN (SELECT cust_id FROM customers WHERE cust_name = 'Martin');
多选题Which three statements are true regarding subqueries?()ASubqueries can contain GROUP BY and ORDER BY clausesBMain query and subquery can get data from different tablesCMain query and subquery must get data from the same tablesDSubqueries can contain ORDER BY but not the GROUP BY clauseEOnly one column or expression can be compared between the main query and subqueryFMultiple columns or expressions can be compared between the main query and subquery
多选题From SQL*Plus, you issue this SELECT statement: SELECT* FROM order; You use this statement to retrieve data from a data table for ().AUpdatingBViewingCDeletingDInsertingETruncating
多选题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? ()ASELECT customer_id, order_id, order_total FROM orders RANGE ON order _ total (100 AND 2000) INCLUSIVE;BSELECT customer_id, order_id, order_total FROM orders HAVING order _ total BETWEEN 100 and 2000;CSELECT customer_id, order_id, order_total FROM orders WHERE order _ total BETWEEN 100 and 2000;DSELECT customer_id, order_id, order_total FROM orders WHERE order_total= 100 and = 2000;ESELECT customer_id, order_id, order_total FROM orders WHERE order_total= 100 and order_total = 2000;
单选题使用sql语句进行恢复数据库使用下列()命令。Aload data from tableBload data from databaseCload data from fileDload data infile
单选题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 AB Exhibit BC The query returns no rowsD The query fails because the outer query is retrieving more than one columnE The query fails because both the inner and outer queries are retrieving data from the same table.
单选题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.