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

Content with tag constraints Rss

   Items 1 to 20 of 35    Older >>
 

Code For Truncating Table with foreign Key Constraints

This can be used for data warehouses as well as truncating table with foreign key constraints.  Read more...
By Vimal Lohani 2016/04/08 | Source: SQLServerCentral.com | Category: truncating tables
Rating: |  Discuss |   Briefcase | 2,532 reads

NULLs to Not NULLs

Script finds char types columns defined to allow NULL values but have non NULL values and generates the ALTER statements for the changes.  Read more...
By Igor Micev 2016/02/22 | Source: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 904 reads

Declarative SQL: Using CHECK() & DEFAULT

SQL is unusual is that data is not passively stored. Instead you use declarative SQL to specify the rules that underlie the data and its integrity. When used properly, constraints can avoid having to provide a lot of logic elsewhere. CHECK() and DEFAULT can do a lot to ensure that your data is correct  Read more...
By Additional Articles 2016/01/26 | Source: SimpleTalk | Category: check()
Rating: (not yet rated)  Rate this |   Briefcase | 3,969 reads

Declarative SQL: Using UNIQUE Constraints

In SQL, you can express the logic of what you want to accomplish without spelling out the details of how the database should do it. Nowhere is this more powerful than in constraints. In this introduction to Declarative SQL, Joe Celko demonstrates how you can write portable code that performs well and executes some complex logic, merely by creating unique constraints.  Read more...
By Additional Articles 2015/12/15 | Source: SimpleTalk | Category: constraints
Rating: (not yet rated)  Rate this |   Briefcase | 5,929 reads

Constraints renaming

Rename constraints to enforce naming conventions.  Read more...
By Luis Cazares 2015/11/18 | Source: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 681 reads

Obedience Training For Databases: Cascading Constraints

In which Phil Factor illustrates in TSQL how it is possible to use foreign key constraints to enforce data rules, and illustrates some surprising consequences of using cascading.  Read more...
By Phil Factor 2015/03/30 | Source: SQLServerCentral.com | Category: constraints
Rating: |  Discuss |   Briefcase | 2,970 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,280 reads

Set-based Constraint Violation Reporting in SQL Server

When you're importing data into an RDBMS in bulk and an exception condition is raised because of a constraint violation, you generally need to fix the problem with the data and try again. The error won't tell you which rows are causing the violation. What if you've thousands of rows to search when it happens? There are solutions, writes William Sisson.  Read more...
By Additional Articles 2014/10/16 | Source: SimpleTalk | Category: constraints
Rating: (not yet rated)  Rate this |   Briefcase | 8,299 reads

Code For Truncating Table with foreign Key Constraints

This can be used for data warehouses as well as truncating table with foreign key constraints.  Read more...
By Vimal Lohani 2016/04/08 | Source: SQLServerCentral.com | Category: truncating tables
Rating: |  Discuss |   Briefcase | 2,532 reads

T- SQL Constraints

By Shiva N 2014/07/31 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,044 reads

It's Not All About The Keys

By Andy Warren 2014/04/14 | Category: foreign key
Rating: (not yet rated) |  Discuss |   Briefcase | 2,211 reads

Leveraging Constraint Evaluation Sequence in SQL Server

Constraints on a table in SQL Server are evaluated in a specific sequence. Knowing this sequence can help us leverage them to realize various business requirements.  Read more...
By Nakul Vachhrajani 2014/01/27 | Source: SQLServerCentral.com | Category: sql server
Rating: |  Discuss |   Briefcase | 2,637 reads

Create Table

By Kapil Singh 2013/04/26 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,224 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,280 reads

UNIQUE constraint

By Gopinath S 2012/12/20 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,053 reads

Handling Constraint Violations and Errors in SQL Server

The database developer can, of course, throw all errors back to the application developer to deal with, but this is neither kind nor necessary. How errors are dealt with is dependent on the application, but the process itself isn't entirely obvious.  Read more...
By Additional Articles 2012/07/10 | Source: SimpleTalk | Category: constraints
Rating: (not yet rated)  Rate this |   Briefcase | 3,365 reads

Constraints and the Test-Driven Database

Bad data always seems to appear when, and where, one least expects it. Sam explains the great value of a defensive approach based on constraints to any team that is developing an application in which the data has to be exactly right, and where bad data could cause consequential severe financial damage. It is perhaps better seen as creating a test-driven database.  Read more...
By Additional Articles 2012/01/09 | Source: SimpleTalk | Category: database design
Rating: (not yet rated)  Rate this |   Briefcase | 2,153 reads

Constraints

By Thomas Abraham 2011/10/17 | Category: t-sql
Rating: (not yet rated) |  Discuss |   Briefcase | 2,618 reads

Primary Keys – why accept the defaults.

G’day, When I design a table in SQL SERVER, I like to have a reasonable understanding of how the table will...  Read more...
By Martin Catherall 2011/03/22 | Source: SQLServerCentral.com | Category: blogs
Rating: (not yet rated)  Rate this |   Briefcase | 2,609 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,524 reads
   Items 1 to 20 of 35    Older >>
 
Tags
t-sql (7)    
foreign keys (fk) (6)    
change constraint name (4)    
naming convention (4)    
database design (3)    
default constraints (2)    
indexing (2)    
administration (1)    
blob manipulation (1)    
blogs (1)    
check constraints (1)    
check() (1)    
ddl (1)    
default (1)    
dri (1)    
foreign key (1)    
insert (1)    
is system named (1)    
naming conventions (1)    
null (1)    
primary key (pk) (1)    
referential integrity (1)    
rename (1)    
select (1)    
sql server (1)    
table (1)    
triggers (1)    
truncating table with foreign key constraints (1)    
truncating tables (1)    
unique (1)