rewrite query to get Curridentity & rows in same resultset

can the below query be bettered or more efficient? thanks
~~~
select distinct Table_name ,rows , current_identity , current_identity-rows  from
(
SELECT IDENT_SEED(TABLE_NAME) AS Seed,
IDENT_INCR(TABLE_NAME) AS Increment,
IDENT_CURRENT(TABLE_NAME) AS Current_Identity,
TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE OBJECTPROPERTY(OBJECT_ID(TABLE_NAME), 'TableHasIdentity') = 1
AND TABLE_TYPE = 'BASE TABLE'
) a left join
(select distinct object_name(id) tabnam, rows from sysindexes where LEN(id)>2 and rows <>0)b
on TABLE_NAME= tabnam
where  current_identity-rows is not null
and  current_identity-rows <>0
order by 4 desc
LVL 5
25112Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jim HornMicrosoft SQL Server Data DudeCommented:
Define 'more efficient' and explain what you're trying to do, as many experts will be hesitant to write a book in response to a general question.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
25112Author Commented:
sure..
the aspect of
{
 where  current_identity-rows is not null
 and  current_identity-rows <>0
}
seems not flawless.. can you help correct that logic

mainly trying to see where Identity max Is way off numberofRows.. and then partb will be the other question - troubleshoot where/how it happened..  

also using sysindexes.. can experts check to make sure all user tables with rows is covered in this query?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server 2008

From novice to tech pro — start learning today.