EXEC SP_HELP TABLES!

So quick update for the moment.  I’ve recently been trying to dissect a database that has a lot of tables to revamp some queries.  The thing I found my self wasting time on was expanding out each of the tables all the time to get the column listing and the associated table information about it.  Behold the above stored procedure above solves this problem.  So what I do is I write down a list of the tables I’m working with.  Then as I come across a moment when I need that info I simply type in exec sp_help table_name_here ;  For complete details check out the MSDN article on it.

sp_help

I’ve got a longer blog post coming later about using OPENROWSET to access information from other SQL servers without needing to create a linked server!

jcox@hexoma.com
One Comment

Add a Comment

Your email address will not be published. Required fields are marked *