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 30    Older >>
 

Script to Generate Foreign Keys

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

Show Table Parents

Which parent tables must contain rows before inserting in to TableX?  Read more...
By William Talada 2014/12/04 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,370 reads

List Table Foreign Keys, Primary key and indexes

This procedure let you list [optional] by table: -Foreign keys -Primary key -Indexes   Read more...
By Martin Collazos 2015/03/27 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 3,871 reads

Get all the Child Tables up to N level

Get all the dependent tables for a master table up to N level(Till the leaf ) you can either find dependency or you can find all the child tables.  Read more...
By Thava 2015/03/09 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 2,677 reads

Find Foriegn Keys and their details in a database

Use this script to find all the Foriegn Keys and their details in a database  Read more...
By Bodhisatya Mookherjee 2013/09/11 | Source: SQLServerCentral.com | Category: schemas
Rating: |  Discuss |   Briefcase | 1,383 reads

Re-Trust Untrusted Foreign Keys and Constraints

This script will attempt to re-trust untrusted foreign keys and will report counts of successes and failures.  Read more...
By Shaun J. Stuart 2013/06/17 | Source: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 891 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 | 853 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,287 reads

Generate Repair Statements for Not-Trusted Foreign Keys

Generates "check this foreign key" statements for all not-trusted foreign keys on a server.  Read more...
By Orestes Zoupanos 2014/11/07 | Source: SQLServerCentral.com | Category: key
Rating: |  Discuss |   Briefcase | 802 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,744 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 | 1,145 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,538 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,287 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,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: SQLServerCentral.com | Category: first normal form
Rating: |  Discuss |   Briefcase | 1,698 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,130 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 | 911 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 | 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: SQLServerCentral.com | Category: foreign keys (fk)
Rating: |  Discuss |   Briefcase | 1,586 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,437 reads
   Items 1 to 20 of 30    Older >>