You have a database that contains the tables shown in the exhibit. (Refer to the Exhibit.)
You deploy a new server that has SQL Server 2012 installed. You need to create a table named Sales.
OrderDetails on the new server. Sales.OrderDetails must meet the following requirements:
Write the results to a disk.
Contain a new column named LineItemTotal that stores the product of ListPrice and Quantity for each row.
The code must NOT use any object delimiters.
The solution must ensure that LineItemTotal is stored as the last column in the table. Which code segment
should you use?
To answer, type the correct code in the answer area.
A.
Explanation:
CREATE TABLE Sales.OrderDetails (
ListPrice money not null,
Quantity int not null,
LineItemTotal as (ListPrice * Quantity) PERSISTED)
Verified answer as correct.
Reference: http://msdn.microsoft.com/en-us/library/ms174979.aspx
Reference: http://technet.microsoft.com/en-us/library/ms188300.aspx
Alter Table
ADD ListItemTotal as (ListPrice * ItemStore)
0
0
CREATE TABLE Sales.OrderDetails ( ListPrice money not null,
Quantity int not null, LineItemTotal as (ListPrice * Quantity) PERSISTED)
0
0
Why not just alter the OrderDetails table? like Unar said?
0
0
WEll it does say you need to create perhaps that is why?
I just thought that the table has been already created xD
0
0
because the question said:
You deploy a new server that has SQL Server 2012 installed. You need to create a table named Sales.
OrderDetails on the new server.
so, i think we need to create a new table on the new server.
0
0