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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sorting tables by number of rows??

Author  Topic 

turkalpk
Starting Member

21 Posts

Posted - 2006-04-06 : 03:03:10
Hello , I have 870 tables in a database and I need to sort tables by row numbers to get the ones having biggest number of rows , is there a query?

F16 LÝGHTÝNÝNNNG

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-06 : 03:19:04
This does more or less correctly

Select object_name(id) as table_name, rows from sysindexes
where indid<2 order by rows desc

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

turkalpk
Starting Member

21 Posts

Posted - 2006-04-06 : 11:22:59
quote:
Originally posted by madhivanan

This does more or less correctly

Select object_name(id) as table_name, rows from sysindexes
where indid<2 order by rows desc

Madhivanan

Failing to plan is Planning to fail



It worked prety , thanks.

F16 LÝGHTÝNÝNNNG
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-04-07 : 00:56:53
Well. What does F16 LÝGHTÝNÝNNNG mean?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -