Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how do i find out all of the primary keys on all tables of a db

Status
Not open for further replies.
Feb 12, 2002
1
US
I was wondering whether there's an alternative to
typing sp_helpconstraint on every table?

How can you find out which tables have primary key constraints etc?

Thanks :)

JG
 
Hi

You can use the following sql
select name from sysindexes where status &2048=2048


Reagards

suchetan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top