QUESTION 51
You have a table named dbo.Customers. The table was created by using the following Transact-SQL statement:
CREATE TABLE dbo.Customers
(
CustomerID int IDENTITY(1,1) PRIMARY KEY CLUSTERED,
AccountNumber nvarchar(25) NOT NULL,
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_Customer_AccountNumber ON dbo.Customer (AccountNumber) WITH
FULLSCAN;
B. CREATE CLUSTERED INDEX IX_Customer_AccountNumber ON dbo.Customer (AccountNumber);
C. CREATE NONCLUSTERED INDEX IX_Customer_AccountNumber ON dbo.Customer (AccountNumber)
WHERE AccountNumber = ”;
D. CREATE NONCLUSTERED INDEX IX_Customer_AccountNumber ON dbo.Customer (AccountNumber)
INCLUDE (Country, StateProvince);
Answer: D
QUESTION 52
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 10000 AND Verified = 1))
Answer: C
QUESTION 53
You have a table named AccountsReceivable. 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 TABLE AccountsReceivable (
column_a INT NOT NULL,
column_b VARCHAR(20) NULL)
ON [PRIMARY];
You need to move the AccountsReceivable 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 NONCLUSTERED 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 NONCLUSTERED INDEX idx_AccountsReceivable ON AccountsReceivable(column_a) ON FG_AccountData(column_a);
Answer: C
QUESTION 54
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 INTO Invoice (InvoiceId, … VALUES (10, …
B. SET IDENTITY_INSERT Invoice ON;
INSERT INTO Invoice (InvoiceId, …
VALUES (10, …
SET IDENTITY_INSERT Invoice OFF;
C. ALTER TABLE Invoice;
ALTER COLUMN InvoiceId int;
INSERT INTO Invoice (InvoiceId, …
VALUES (10, …
D. ALTER DATABASE Contoso SET SINGLE_USER;
INSERT INTO Invoice (InvoiceId, …
VALUES (10, …
ALTER DATABASE Contoso SET MULTI_USER;
Answer: B
QUESTION 55
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
QUESTION 56
You are creating a table that stores the GPS location of customers.
You need to ensure that the table allows you to identify customers within a specified sales boundary and to calculate the distance between a customer and the nearest store.
Which data type should you use?
A. geometry
B. geography
C. nvarchar(max)
D. varbinary(max) FILESTREAM
Answer: B
QUESTION 57
You plan to add a new column named SmallKey to the Sales.Product table that will be used in a
unique constraint. You are required to ensure that the following information is applied when adding the new column:
‘a1’ and ‘A1’ are treated as different values
‘a’ and ‘A’ sort before ‘b’ and ‘B’ in an ORDER BY clause
You need to select the collation that meets the requirements for the new column. Which collation should you select?
A. Latin1_General_BIN
B. SQL_Latin1_General_CP1_CI_AI
C. SQL_Latin1_General_CP1_CI_AS
D. SQL_Latin1_General_CP1_CS_AS
Answer: D
QUESTION 58
You have multiple tables that represent properties of the same kind of entities. The property values are comprised of text, geometry, varchar(max), and user-defined types specified as ‘bit NOT NULL’ data types.
You plan to consolidate the data from multiple tables into a single table. The table will use semi-structured storage by taking advantage of the SPARSE option.
You are tasked to identify the data types that are compatible with the SPARSE option.
Which data type is compatible with the SPARSE option?
A. text
B. geometry
C. varchar(max)
D. A user-defined type defined as ‘bit NOT NULL’
Answer: C
QUESTION 59
You currently store date information in two columns. One column contains the date in local time and one column contains the difference between local time and UTC time. You need to store this data in a single column.
Which data type should you use?
A. time
B. datetime2
C. datetime2(5)
D. datetimeoffset
Answer: D
QUESTION 60
You have two partitioned tables named Transaction and TransactionHistory.
You need to archive one of the partitions of the Transaction table to the TransactionHistory table.
Which method should you use?
A. ALTER TABLE …
SWITCH …
B. INSERT … SELECT …; TRUNCATE TABLE
C. ALTER PARTITION FUNCTION … MERGE …
D. ALTER PARTITION FUNCTION …
SPLIT …
Answer: B
If you want to pass Microsoft 70-433 successfully, donot missing to read latest lead2pass Microsoft 70-433 exam questions.
If you can master all lead2pass questions you will able to pass 100% guaranteed.