Which Transact-SQL statement should you use?

You are given a database design to evaluate. All of the tables in this database should have a clustered index.
You need to determine the tables that are missing a clustered index by using the system catalog views.
Which Transact-SQL statement should you use?
A. SELECT name AS table_name
FROM sys.tables
WHERE OBJECTPROPERTY(object_id,’TableHasClustIndex’) = 0
ORDER BY name;
B. SELECT name AS table_name
FROM sys.tables
WHERE OBJECTPROPERTY(object_id,’TableHasClustIndex’) = 0
AND OBJECTPROPERTY(object_id,’TableHasUniqueCnst’) = 1
ORDER BY name;
C. SELECT name AS table_name
FROM sys.tables
WHERE OBJECTPROPERTY(object_id,’TableHasUniqueCnst’) = 0
ORDER BY name;
D. SELECT name AS table_name
FROM sys.tables
WHERE OBJECTPROPERTY(object_id,’TableHasClustIndex’) = 1
AND OBJECTPROPERTY(object_id,’TableHasUniqueCnst’) = 1
ORDER BY name;

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.