Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vijay1234
Starting Member
48 Posts |
Posted - 2014-09-02 : 03:01:22
|
Hi Friends,I would need a query for respective DB to find the list of top 20 tables along with schema.Below query is not giving me the schema, since i have not used systables.select top 20 object_name(id) as tablename,rowcnt as [no of records]from sysindexes where indid in (0,1) order by rowcnt descKindly provide me the query which will give the schema name as well before the tablename dear friends.Thanks much in advance.Regards,Vijay |
|
stepson
Aged Yak Warrior
545 Posts |
Posted - 2014-09-02 : 03:15:01
|
[code]select top 20 Object_Schema_name(id) as SchemaName ,object_name(id) as tablename ,rowcnt as [no of records]from sysindexes AS SI where indid in (0,1) order by rowcnt desc[/code]sabinWeb MCP |
|
|
vijay1234
Starting Member
48 Posts |
Posted - 2014-09-02 : 08:44:21
|
Thankyou Mate :) |
|
|
|
|
|