Click here to monitor SSC
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Scripts with tag Foreign Keys (FK) Rss

Search for any content tagged foreign keys (fk)

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Add a script

   Items 1 to 20 of 24    Older >>

Script to Generate Foreign Keys

Generate Script for existing Foreign Keys for any emergency.  Read more...
By Sheraz Mirza 2016/05/26 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 50 reads

Check Candidate Columns for FOREIGN KEY Constraints

Reports table columns that are not foreign keys but that perhaps should be.  Read more...
Rating: (not yet rated) |  Discuss |   Briefcase | 851 reads

Rename Foreign Key Constraints

Rename Foreign Key Constraints in a consistent manner. Ideal for preventing constraint errors during code promotion.  Read more...
By Wes Henriksen 2015/02/09 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,283 reads

Find Foreign Keys

Lists the foreign keys between tables in the datavase,  Read more...
By suba sathyanathan 2012/10/12 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,741 reads

Check if Constraint is enabled or disabled

This is a script to find all constraints and check if they are enabled or disabled.  Read more...
By roberto armellin 2011/11/03 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,106 reads

Columns Explorer - With constraints create / drop scripts (no cursors)

Gets all columns infos, foreign keys (multicolumn fk handled), referenced primary keys, default and check constraints, indexes, Create/Drop scripts for all constraints.  Read more...
By antonio cuna 2011/02/28 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,535 reads

Stored procedure to script tables, has many options

I needed a fast way of creating identical copies of multiple tables. The criteria was to make identical copies of tables for a specific schema. Well there it started.  Read more...
By Gokhan Varol 2011/02/01 | Source: | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,284 reads

Fix Foreign Key Constraint Naming

This stored procedure can be used for applying a custom foreign key constraint naming  Read more...
By Michael S√łndergaard 2010/10/08 | Source: | Category: constraints
Rating: |  Discuss |   Briefcase | 1,310 reads

1NF View Generator

Creates a view/select statement for given transactional table using foreign key info. Great for ETL extraction or History table routine.  Read more...
By Mark Stockwell 2011/06/27 | Source: | Category: first normal form
Rating: |  Discuss |   Briefcase | 1,697 reads

Changing Foreign key names to standard naming convention across the DB

Rename the Foreign keys to standard notation - FK_childTable_ParentTable  Read more...
By Vidyadhar Pandekar 2010/02/24 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,127 reads

Rename foreign key constraints (SQL Server 2005 & 2008)

Rename all FK constraint names in your database with the format ChildTableName_ParentTableName_ObjId_FK.  Read more...
By MadDan 2010/01/26 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 910 reads

Implementing Most Recently Used Lookups

This script will adapt ordering of look-up lists by foreign key usage.  Read more...
By William Talada 2010/01/18 | Source: | Category: t-sql
Rating: |  Discuss |   Briefcase | 826 reads

Show Cascade Delete Tree

See indented tree of tables involved in foreign key cascade deletes.  Read more...
By William Talada 2010/01/07 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,583 reads

Find botched constraints, idxs, fks

Shows awesome view of columns with constraints and indexes and foreign keys to spot errors fast.  Read more...
By William Talada 2010/08/04 | Source: | Category: table
Rating: |  Discuss |   Briefcase | 1,437 reads

The Ultimate Index-Less Foreign-Key Finder

Searches for foreign key constraints that don't have fully matching indexes. The best partial matching indexes are outputted with MatchCounts and column comparisons.  Read more...
By Jesse Roberge 2009/10/15 | Source: | Category: administration
Rating: |  Discuss |   Briefcase | 1,343 reads

Find Foreign Key Tables

an easy method to find foreign key tables from primary key table  Read more...
By Jason S Wong 2009/10/27 | Source: | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,541 reads

Find Missing Foreign Keys

Find missing foreign keys in your database schema based on naming conventions.  Read more...
By submoa 2009/08/24 | Source: | Category: utility
Rating: |  Discuss |   Briefcase | 1,234 reads


Truncates referenced tables 
By Sergey Benner 2009/01/23 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,785 reads

Truncate Referenced Table

Often during the development phase one is required to truncate a table. often the task of removing foreign key references is necessary to truncate. this sp takes the pain out of it.  Read more...
By Chris Morton 2009/01/19 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,271 reads

Disable Foreign keys

Script to disable foreign keys (SQL2005) 
By Kev Riley 2008/10/24 | Source: | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 723 reads
   Items 1 to 20 of 24    Older >>