February 20, 2009 at 5:06 am
hi everyone,
i have a list of 10 tables. I need to know their primary and foreign keys descriptions
and also index information for each table
can have a tsql query that can get this info for me
thanks
February 20, 2009 at 5:22 am
for example, a query similar to highlighting the table name in query analyser and pressing ALT+F1 :w00t:
February 20, 2009 at 7:59 am
Try searching the script library on this site. Here is one that will identify foreign keys:
http://www.sqlservercentral.com/scripts/foreign+keys/64333/
This might get you started on the others as well.
Here's a search for Primary Keys and the first result is a script to find them all:
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
February 22, 2009 at 12:31 pm
[font="Verdana"]Some good answers already. Check out the INFORMATION_SCHEMA views.[/font]
February 23, 2009 at 7:35 am
sp_help 'tablename' will display all of the information you need and some extra stuff too.
Chris
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply