0% found this document useful (0 votes)
134 views4 pages

Answer: B

The document contains 10 multiple choice questions about SQL Server concepts like permissions, indexes, constraints, partitioning and more. Each question has a single correct answer that is a Transact-SQL statement or clause to implement the described task or requirement.

Uploaded by

Preity.055
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views4 pages

Answer: B

The document contains 10 multiple choice questions about SQL Server concepts like permissions, indexes, constraints, partitioning and more. Each question has a single correct answer that is a Transact-SQL statement or clause to implement the described task or requirement.

Uploaded by

Preity.055
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

70-433

Question: 1
You have a user named John. He has SELECT access to the Sales schema. You need to eliminate John's SELECT
access rights from the Sales.SalesOrder table without affecting his other permissions. Which Transact-SQL
statement should you use?
A. DROP USER John;
B. DENY SELECT ON Sales.SalesOrder TO John;
C. GRANT DELETE ON Sales.SalesOrder TO John;
D. REVOKE SELECT ON Sales.SalesOrder FROM John;
Answer: B

Question: 2
You need to create a column that allows you to create a unique constraint. Which two column definitions should
you choose? (Each correct answer presents a complete solution. Choose two.)
A. nvarchar( 100) NULL
B. nvarchar(max) NOT NULL
C. nvarchar( 100) NOT NULL
D. nvarchar( 100) SPARSE NULL
Answer: A, C

Question: 3
You manage a SQL Server 2008 database that is located at your company's corporate headquarters. The database
contains a table named dbo.Sales. You need to create different vi ews of the dbo.Sales table that will be used by
each region to insert, update, and delete rows. Each regional office must only be able to insert, update, and delete
rows for their respective region. Which view should you create for Region1?
A. CREATE VIEW dbo.Region1Sales
AS
SELECT SalesID,OrderQty,SalespersonID,R egionID FROM dbo.Sales
WHERE RegionID = 1;
B. CREATE VIEW dbo.Region1Sales
AS
SELECT SalesID,OrderQty,SalespersonID,R egionID FROM dbo.Sales
WHERE RegionID = 1
WITH CHECK OPTION;
C. CREATE VIEW dbo.Region1Sales
WITH SCHEMABIND ING
AS
SELECT SalesID,OrderQty,SalespersonID,R egionID FROM dbo.Sales
WHERE RegionID = 1;
D. CREATE VIEW dbo.Region1Sales
WITH VIEW_METADATA AS
SELECT SalesID,OrderQty,SalespersonID,R egionID FROM dbo.Sales
WHERE RegionID = 1;
Answer: B

Question: 4
You administer a SQL Server 2008 database that contains a table name dbo.Sales, which contains the following
table definition:
CREATE TABLE [dbo].[Sales](
[SalesID] [int] ID ENTITY(1,1) NOT NULL PRIMARY KEY CLUSTERED,
[OrderDate] [datetime] NOT NULL,
[CustomerID] [int] NOT NULL,
[SalesPersonID] [int] NUL L,
[CommentDate] [date] NULL);
This table contains millions of orders. You run the following query to determine when sales persons comment in
the dbo.Sales table:
SELECT SalesID,Cus tomerID,SalesPersonID,C ommentDate
FROM dbo.Sales
WHERE CommentDate IS NOT NULL AND SalesPersonID IS NOT NULL;
You discover that this query runs slow. After examining the data, you find only 1% of rows have comment dates
and the SalesPersonID is null on 10% of the rows. You need to create an index to optimize the query. The index
must conserve disk space while optimizing
your query. Which index should you create?
A. CREATE NONCLU STERED INDEX idx1
ON dbo.Sales (CustomerID)
INCLUDE (CommentDate,SalesPersonID);
B. CREATE NONCLU STERED INDEX idx1
ON dbo.Sales (SalesPersonID)
INCLUDE (CommentDate,CustomerID);
C. CREATE NONCLU STERED INDEX idx1
ON dbo.Sales (CustomerID) INCLUDE(CommentDate)
WHERE SalesPersonID IS NOT NUL L;
D. CREATE NONCLU STERED INDEX idx1
ON dbo.Sales (CommentDate, SalesPersonID) INCLUDE (Cus tomerID)
WHERE CommentDate IS NOT NUL L;
Answer: D

Question: 5
Your database is 5GB and contains a table named SalesHistory. Sales information is frequently inserted and
updated. You discover that excessive page splitting is occurr ing. You need to reduce the occurrence of page
splitting in the SalesHistory table. Which code segment should you use?
A. ALTER DATABASE Sales
MODIFY FILE
(NAME = Salesdat3, SIZE = 10GB);
B. ALTER INDEX ALL ON Sales.SalesHistory
REBUILD WITH (FILLFACTOR = 60);
C. EXEC sys.sp_configure 'fill factor (%)', '60';
D. UPDATE STATISTICS Sales.SalesHistory(Products) WITH FULLSCAN, NOR ECOMPUTE;
Answer: B

Question: 6
You have a table named dbo.Customers. The table was created by using the following Transact-SQL statement:
CREATE TABLE dbo.Customers
(
Cus tomerID int IDENTITY(1,1) PRIMARY KEY CLUSTERED, AccountNumber nvarchar( 25)
NOT NUL L,
FirstName nvarchar(50) NOT NULL,
LastName nvarchar(50) NOT NULL,
AddressLine1 nvarchar(255) NOT NULL, AddressLine2 nvarchar(255) NOT NULL, City
nvarchar(50) NOT NULL, StateProvince nvarchar(50) NOT NULL, Country nvarchar(50) NOT
NULL, PostalCode nvarchar(50) NOT NULL,
CreateDate datetime NOT NULL DEFAULT(GETDATE()) ,
ModifiedDate datetime NOT NULL DEFAULT(GETDATE())
)
You create a stored procedure that includes the AccountNumber, Country, and StateProvince columns from the
dbo.Customers table. The stored procedure accepts a parameter to filter the output on the AccountNumber
column. You need to optimize the performance of the stored procedure. You must not change the existing
structure of the table.
Which Transact-SQL statement should you use?
A. CREATE STATISTICS ST_Cus tomer_AccountNumber
ON dbo.Customer (AccountNumber) WITH FULLSCAN ;
B. CREATE CLUSTERED INDEX IX_Cus tomer_AccountNumber
ON dbo.Customer (AccountNumber);
C. CREATE NONCLU STERED INDEX IX_Customer_AccountNumber
ON dbo.Customer (AccountNumber) WHERE AccountNumber = '';
D. CREATE NONCLU STERED INDEX IX_Customer_AccountNumber
ON dbo.Customer (AccountNumber) INCL UDE (Country, StateProvince);
Answer: D

Question: 7
You have a table named Customer. You need to ensure that customer data in the table meets the following
requirements:
credit limit must be zero unless customer identification has been verified. credit limit must be less than 10,000.
Which constraint should you use?
A. CHECK (CreditLimt BETWEEN 1 AND 10000)
B. CHECK (Verified = 1 AND CreditLimt BETWEEN 1 AND 10000)
C. CHECK ((CreditLimt = 0 AND Verified = 0) OR (CreditLimt BETWEEN 1 AND 10000 AND Verified = 1))
D. CHECK ((CreditLimt = 0 AND Verified = 0) AND (CreditLimt BETWEEN 1 AND 1000 0 AND Verified =1))
Answer: C

Question: 8
You have a table named AccountsRec eivable. The table has no indexes. There are 75,000 rows in the table. You
have a partition function named FG_AccountData. The AccountsReceivable table is defined in the following
Transact-SQL statement:
CREATE TABLEAccountsReceiv able (
column_a INT NOT NULL, column_b VARCHAR(20) NULL)
ON [PRIMARY];
You need to move the AccountsReceiv able table from the PRIMARY file group to FG_AccountData. Which
Transact-SQL statement should you use?
A. CREATE CLUSTERED INDEX idx_AccountsReceivable
ON AccountsReceivable(column_a) ON [FG_AccountData];
B. CREATE NONCLU STERED INDEX idx_AccountsReceivable
ON AccountsReceivable(column_a) ON [FG_AccountData];
C. CREATE CLUSTERED INDEX idx_AccountsReceivable
ON AccountsReceivable(column_a) ON FG_AccountData(column_a);
D. CREATE NONCLU STERED INDEX idx_AccountsRec eivable
ON AccountsReceivable(column_a) ON FG_AccountData(column_a);
Answer: C

Question: 9
You have a SQL Server 2008 database named Contoso with a table named Invoice. The primary key of the table is
InvoiceId, and it is populated by using the identity property. The Invoice table is related to the InvoiceLineItem
table. You remove all constraints from the Invoice table during a data load to increase load speed. You notice that
while the constraints were removed, a row with InvoiceId = 10 was removed from the database. You need to re-
insert the row into the Invoice table with the same InvoiceId value.
Which Transact-SQL statement should you use?
A. INSERT IN TO Invoice (InvoiceId, ...
VALUES (10, ...
B. SET IDENTITY_INSERT Invoice ON; IN SERT INTO Invoice (InvoiceId, ... VALUES (10, ...
SET IDENTITY_IN SERT Invoice OFF;
C. ALTER TABLE Invoice;
ALTER COLUMN InvoiceId int; INSERT INTO Invoice (InvoiceId, ... VALUES (10, ...
D. ALTER DATABASE Contoso SET SING LE_USER;
INSERT INTO Invoice (InvoiceId, ... VALUES (10, ...
ALTER DATABASE Contoso SET MULTI_USER;
Answer: B

Question: 10
You are developing a new database. The database contains two tables named SalesOrderDetail and Product. You
need to ensure that all products referenced in the SalesOrderDetail table have a corresponding record in the
Product table. Which method should you use?
A. JOIN
B. DDL trigger
C. Foreign key constraint
D. Primary key constraint
Answer: C

You might also like