Which three Transact-SQL statements should you use?

You administer a Microsoft SQL Server 2008 instance that has two databases.
The first database named AdventureWorks contains a table named Sales.SalesOrders.
The Sales.SalesOrders table has the following definition:
CREATE TABLE [Sales].[SalesOrderDetail](
[SalesOrderDetailID] [int] IDENTITY(1,1) NOT NULL,
[ProductID] [int] NOT NULL,
[OrderQty] [smallint] NOT NULL,
[OrderDate] [datetime] NOT NULL,
CONSTRAINT [PK_SalesOrderDetail] PRIMARY KEY CLUSTERED ([SalesOrderDetailID] ASC)) ON [PRIMARY]
The second database named AdventureWorksDW contains a table named dbo.SalesOrderSummary.
The dbo.SalesOrderSummary table has the following definition:
CREATE TABLE [dbo].[SalesOrderSummary] (
ProductID [int] NOT NULL,
OrderQty [int] NOT NULL,
OrderYear [int] NOT NULL,
CONSTRAINT [PK_SalesOrderSummary] PRIMARY KEY CLUSTERED (OrderYear ASC, ProductID ASC)) ON [PRIMARY]
You plan to migrate sales data for the year 2011 from the SalesOrderDetail table into the SalesOrderSummary table.
You need to ensure that the following requirements are met:
•All data is removed from the SalesO rderSummary table before migrating data.
•A subset of data is migrated from the SalesOrderDetail table in the AdventureWorks database to the SalesOrderSummary table in the AdventureWorksDW database.
•Migrated data summarizes order quantity in one row per product for the year 2011.
Which three Transact-SQL statements should you use? (To answer, move the appropriate statements from the list of statements to the answer area and arrange them in the correct order.)
Build List and Reorder:


microsoft-exams

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.