Quick and Dirty MS Database Analysis

This method queries all tables in a database and it displays the top 10 rows.

Get all tables with the following query:
SELECT name FROM ssysobjects WHERE type = ‘u’;

Copy&Paste it into Excel A Column and put following Formula into B Column for each row:
="SELECT TOP 10 * FROM " & A1 &";"

Result will be something like this:
SELECT TOP 10 * FROM COMPANY; SELECT TOP 10 * FROM PEOPLE; SELECT TOP 10 * FROM BILLS;

Run this query in Microsoft Management Studio an analyse the result.

admin on February 4th 2012 in MSSQL

No Comments »

Comments RSS

Leave a Reply

*




Check out new movies online website. Download and buy movies now.
1