• Get Primary key – Foreign key relations table in sql server 2005

    Why it is required? The main purpose of this is finding related constraint table from database. Check below Query. –get table list with constraint(primary and foreign key) select * from information_schema.constraint_column_usage –get table list with foreign key constraint select * from information_schema.referential_constraints –get the relation select tblAll.table_name as PrimaryTableName, tblAll.column_name as PrimaryTableColumn, tblFK.table_name as ForeignKeyTable,…