Gives the list of index in the specified database.
use Northwind
SELECT object_name(object_id) as TableName, *
FROM sys.indexes
-- Get the indexes from all the table in the current database
exec sp_msforeachtable "sp_spaceused '?'"
No comments:
Post a Comment