You are here:   Home > Blog
Register   |  Login

Blog Search

Minimize

Captured Technology - Blog

Minimize

Getting a List of SQL Database Tables with One Statement

Mar 23

Written by:
3/23/2009 10:31 PM  RssIcon


SELECT 
    [TableName] = so.name, 
    [RowCount] = MAX(si.rows) 
FROM 
    sysobjects so, 
    sysindexes si 
WHERE 
    so.xtype = 'U' 
    AND 
    si.id = OBJECT_ID(so.name) 
GROUP BY 
    so.name 
ORDER BY 
    2 DESC

Tags:
Categories:

2 comment(s) so far...


Gravatar

Re: Getting a List of SQL Database Tables with One Statement

Thanks for the info.

By Positive Thinking on   3/29/2009 1:49 PM
Gravatar

Re: Getting a List of SQL Database Tables with One Statement

I like the cod every much as my cms software allows for sql statement execution and I forget the names of tables and columns at times.netflix free 14 day trail

By netflix free 14 day trail on   4/8/2009 8:44 PM

Your name:
Gravatar Preview
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Blog Admin

Minimize
You must be logged in and have permission to create or edit a blog.

Translate

Minimize

Sponsors

Minimize
Fast and Free Expedited Shipping on orders over $59 offer applies to Bookbyte inventory only - 160x600 banner

Recent Comments

Minimize
Re: Three Benefits to Using a Royalty-Free Image on Your Website or Blog
I also prefer to use royalty-free images. They give more credibility in your site or blog posts.
Re: Websites vs. Facebook Pages (Infographic)
Internet can be very useful for small business to market them self, there is always some free way to reach your audience via Internet.
Re: Is Keyword Density Still Important For On Page SEO
The search engines hadn’t quite caught up yet. As a result, it wasn’t uncommon to see sites rank highly when their content read something like this.that they follow SEO best practices than you will by trying to figure out a way to get your keywords into your page content another one or two times.
Re: Websites vs. Facebook Pages (Infographic)
Very interesting topic, infographics was a new concept for me, will definitely use it.
Re: Reducing Small Business Blues
Running a business is tough and you are right, most of the time you are the core aspect of each area of a business. I don't think I could handle doing my own accounting, like you I am too terrible with numbers!

u comment, i follow