For SQL Server
–Finding all details of Primary Key constraint
select * from sysobjects
where xtype=’PK’
–Finding all details of Foreign Key constraint
select * from sysobjects
where xtype=’F’
–Finding all User-Defined objects (tables, etc)
select * from sysobjects
where xtype=’U’
–Finding all System objects
select * from sysobjects
where xtype=’S’
–Finding all user names
select * from sysusers
–Finding Column Names of Particular Table
–Select Pubs Database
select c.name from sysobjects [...]

PakAlert Press
Pakistan Ka Khuda Hafiz