En este artículo, se muestra como obtener información de : ClusteredIndex, Identity y PrimaryKeys en el servidor SQL
SELECT SCHEMA_NAME(schema_id) AS SchemaName,
name AS TableName,
OBJECTPROPERTY(object_id, 'TableHasClustIndex') AS HasClusteredIndex,
OBJECTPROPERTY(object_id, 'TableHasIdentity') AS HasIdentity,
OBJECTPROPERTY(object_id, 'TableHasprimarykey') AS HasPrimaryKey
FROM sys.tables
ORDER BY 1, 2
Leave a Reply