Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

Scripts with tag Foreign Keys (FK) Rss

Search for any content tagged foreign keys (fk)

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

Add a script

   Items 1 to 20 of 23    Older >>
 

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 | 802 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 2013/04/08 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 690 reads

Find Foreign Keys

Lists the foreign keys between tables in the datavase,  Read more...
By suba sathyanathan 2012/10/12 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,637 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 890 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,465 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: SQLServerCentral.com | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,226 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: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 1,244 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: SQLServerCentral.com | Category: first normal form
Rating: |  Discuss |   Briefcase | 1,638 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,094 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 885 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: SQLServerCentral.com | Category: t-sql
Rating: |  Discuss |   Briefcase | 811 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,500 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: SQLServerCentral.com | Category: table
Rating: |  Discuss |   Briefcase | 1,406 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: SQLServerCentral.com | Category: administration
Rating: |  Discuss |   Briefcase | 1,296 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: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,456 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: SQLServerCentral.com | Category: utility
Rating: |  Discuss |   Briefcase | 1,181 reads

sp_truncate

Truncates referenced tables  Read more...
By Sergey Benner 2009/01/23 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,673 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,241 reads

Disable Foreign keys

Script to disable foreign keys (SQL2005)  Read more...
By Kev Riley 2008/10/24 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 699 reads

Find Foreign Keys

This script lists all foreign keys with parent and child table information  Read more...
By Jack Corbett 2008/09/11 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,296 reads
   Items 1 to 20 of 23    Older >>