What should you do?

You are a database administrator for AIOTestKing.com. You administer a SQL Server 2005 computer that contains a database named Customers. The database includes a table named CustInfo. The table includes an identity column named CustID and an nvarchar column named CustName. Company policy requires that rows containing duplicate CustName values be removed from the CustInfo table once each year. However, rows cannot be removed from the CustInfo table until they have been manually examined and verified as being duplicates. You need to provide a way to identify potential duplicate rows for manual examination. You need to accomplish this goal by using the least amount of administrative effort. What should you do?

You are a database administrator for AIOTestKing.com. You administer a SQL Server 2005 computer that contains a database named Customers. The database includes a table named CustInfo. The table includes an identity column named CustID and an nvarchar column named CustName. Company policy requires that rows containing duplicate CustName values be removed from the CustInfo table once each year. However, rows cannot be removed from the CustInfo table until they have been manually examined and verified as being duplicates. You need to provide a way to identify potential duplicate rows for manual examination. You need to accomplish this goal by using the least amount of administrative effort. What should you do?

A.
Create a trigger for the CustInfo table that rolls back INSERT queries that contain duplicate data.

B.
Use a SELECT INTO query that includes GROUP BY and HAVING clauses to create a new table that contains duplicate rows from the CustInfo table.

C.
Create a new unique index on the CustName column. Specify IGNORE_DUP_KEY = ON when creating index.

D.
On the CustName column, create a foreign key constraint that references a distinct list of CustName values.



Leave a Reply 0

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