Showing posts with label sql server. Show all posts
Showing posts with label sql server. Show all posts

Wednesday, 16 July 2014

Maximum number of Index per table.



In SQL Server 2005: 250 Index

                                   Clustered Index: 1
                                   Non clustered Index: 249

In SQL Server 2008: 1000 Index

                                  Clustered Index: 1
                                  Non clustered Index: 999

Wednesday, 9 July 2014

List All Tables in a Database




Description: Query to get list of all the tables in SQL server.


USE TestDB
SELECT * FROM information_schema.tables
OR
USE  TestDB
SELECT * FROM SYS.tables
OR
SELECT * FROM sysobjects WHERE xtype='U'













Once we run above query we will get all tables name in specific Database