Skip to content

Mr SQL's Blog

Musings on Microsoft SQL Server

Monthly Archives: November 2010

Simple information about indexes can be found by running

sp_helpindex 'HumanResources.Employee'

where ‘HumanResources.Employee’ is the name of a table. index_name, index_description and index_keys are displayed in the results window:-



Tags: , , ,

It is possible to obtain the ‘date of creation’ of a table, as well as its last modification date (DDL, not DML) by running the following query:-

SELECT [name] AS 'Table', 
[create_date] AS 'Creation Date', 
[modify_date] AS 'Modification Date' 
FROM sys.objects
WHERE type_desc = 'USER_TABLE' 
ORDER BY [modify_date] DESC

Tags: , , , ,

%d bloggers like this: