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

Content with tag Primary Key (PK) Rss

   Items 1 to 20 of 20   
 

T-SQL

By Chirag Patel 2013/01/04 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,518 reads

Find Primary Column of all tables in database

This code helps in finding Primary Keys for all tables in a database.  Read more...
By Nitesh Dedhia 2012/10/02 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,311 reads

Primary Keys

By Dwain Camps 2012/07/30 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,820 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

Find gaps in primary keys across multiple databases

Output table of gaps in a primary key across multiple databases on same, remote and/or linked servers.  Read more...
By Richard White 2011/08/29 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 797 reads

Changing Primary key names to standard naming convention across the DB

This script will rename the Primary keys to standard notation - PK_TableName  Read more...
By Vidyadhar Pandekar 2011/07/29 | Source: SQLServerCentral.com | Category: rename primary key
Rating: |  Discuss |   Briefcase | 1,623 reads

proc to change PK

This script was created for a client who had uniqueidentifier PKs, but wanted to switch to BIGINT IDENTITY PK for better db performance.  Read more...
By colin_sloss 2011/03/24 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: (not yet rated) |  Discuss |   Briefcase | 887 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

Do You Really Need Surrogate Keys? Part 1 – Concepts and Methods

This is the first of a series of articles to analyze the use of surrogate keys in different scenarios.   Read more...
By Wagner Crivelini 2010/10/25 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 12,997 reads

Ways to minimize sort operations

In this article Brian Ellul explorea how it's possible to eliminate the SORT operator (and its performance cost) on performing SELECTS statements.  Read more...
By Brian Ellul 2010/09/15 | Source: SQLServerCentral.com | Category: sort operator
Rating: |  Discuss |   Briefcase | 10,688 reads

Predict the outcome

By SQL Buzz 2010/07/15 | Category: primary key (pk)
Rating: (not yet rated) |  Discuss |   Briefcase | 3,873 reads

Primary Keys

By Paul Randal 2010/03/10 | Category: indexing
Rating: (not yet rated) |  Discuss |   Briefcase | 4,249 reads

Changing Primary key names to standard naming convention across the DB

This script will rename the Primary keys to standard notation - PK_TableName  Read more...
By Vidyadhar Pandekar 2011/07/29 | Source: SQLServerCentral.com | Category: rename primary key
Rating: |  Discuss |   Briefcase | 1,623 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

Create/ drop unique key

This script will show you how to create/ drop unique key.  Read more...
By Michaël Hardman 2009/09/24 | Source: SQLServerCentral.com | Category: create
Rating: |  Discuss |   Briefcase | 629 reads

how get primary key in any database

drop the primary key name is different for each database  Read more...
By Furanshizuku 2009/01/29 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,257 reads

Getting unique or primary key columns for a given table

Following script will list out all the columns which have unique/primary key constraints for a given table.  Read more...
By Kiran Kumar 2009/01/02 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,207 reads

Generate Insert Statements

This script Generates the insert statements for a particular table.  Read more...
By Vinay Kumar 2008/11/04 | Source: SQLServerCentral.com | Category: primary key (pk)
Rating: |  Discuss |   Briefcase | 1,707 reads

Add Primary key

This Store procedure is used to add primary key to all tables in a database, if table does not contain it.  Read more...
By Vinay Kumar 2008/11/04 | Source: SQLServerCentral.com
Rating: (not yet rated) |  Discuss |   Briefcase | 873 reads
   Items 1 to 20 of 20   
 
Tags
foreign keys (fk) (4)    
indexing (4)    
t-sql (4)    
clustered index (2)    
create (2)    
table (2)    
unique (2)    
b-tree (1)    
check constraint (1)    
constraint (1)    
covering indexes (1)    
data gaps (1)    
database (1)    
databases (1)    
dbcc dropcleanbuffers (1)    
dbcc freeproccache (1)    
delete records (1)    
drop (1)    
drop primary key (1)    
drop table (1)    
execute (1)    
execution plans (1)    
identity property (1)    
indexed views (1)    
non clustered indexes (1)    
referential integrity (1)    
rename primary key (1)    
sloss (1)    
sort operator (1)    
sql server (1)    
surrogate key (1)    
tables (1)    
unique constraint (1)    
unique index (1)    
uniqueidentifier (1)    
xml (1)