Results must include customers who have not placed

This preview shows page 73 - 75 out of 94 pages.

We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Oracle 12c: SQL
The document you are viewing contains questions related to this textbook.
Chapter 12 / Exercise 4
Oracle 12c: SQL
Casteel
Expert Verified
Results must include customers who have not placed any orders. Which Transact-SQL query should you use? A. SELECT CustomerName, OrderDate FROM Customers RIGHT OUTER JOIN Orders ON Customers.CustomerID = Orders.CustomerID B. SELECT CustomerName, OrderDate FROM Customers JOIN Orders ON Customers.CustomerID = Orders.CustomerID C. SELECT CustomerName, OrderDate FROM Customers CROSS JOIN Orders ON Customers.CustomerID = Orders.CustomerID D. SELECT CustomerName, OrderDate FROM Customers LEFT OUTER JOIN Orders ON Customers.CustomerID = Orders.CustomerID Answer:D Explanation:Reference: 53.You create a stored procedure that will update multiple tables within a transaction. You need to ensure that if the stored procedure raises a run-time error, the entire transaction is terminated and rolled back. Which Transact-SQL statement should you include at the beginning of the stored procedure? A. SET XACT_ABORT ON B. SET ARITHABORT ON C. TRY D. BEGIN E. SET ARITHABORT OFF F. SET XACT_ABORT OFF Answer:A Explanation:Reference: Reference: 54.Your database contains two tables named DomesticSalesOrders and InternationalSalesOrders. Both tables contain more than 100 million rows. Each table has a Primary Key column named SalesOrderId.
We have textbook solutions for you!
The document you are viewing contains questions related to this textbook.
Oracle 12c: SQL
The document you are viewing contains questions related to this textbook.
Chapter 12 / Exercise 4
Oracle 12c: SQL
Casteel
Expert Verified
The safer , easier way to help you pass any IT exams.73/ 92The data in the two tables is distinct from one another. Business users want a report that includes aggregate information about the total number of global sales and total sales amounts. You need to ensure that your query executes in the minimum possible time. Which query should you use? A. SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM ( SELECT SalesOrderId, SalesAmount FROM DomesticSalesOrders UNION ALL SELECT SalesOrderId, SalesAmount FROM InternationalSalesOrders ) AS p B. SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM ( SELECT SalesOrderId, SalesAmount FROM DomesticSalesOrders UNION SELECT SalesOrderId, SalesAmount FROM InternationalSalesOrders ) AS p C. SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM DomesticSalesOrders UNION SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM InternationalSalesOrders D. SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM DomesticSalesOrders UNION ALL SELECT COUNT(*) AS NumberOfSales, SUM(SalesAmount) AS TotalSalesAmount FROM InternationalSalesOrders Answer:A Explanation:Reference: Reference: -all-optimalperformance-comparison/ 55.You are a database developer at an independent software vendor. You create stored procedures that contain proprietary code.

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture