THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Browse by Tags

All Tags » constraints   (RSS)
  • Working with Temporal Data in SQL Server

    My third Pluralsight course, Working with Temporal Data in SQL Server, is published. I am really proud on the second part of the course, where I discuss optimization of temporal queries. This was a nearly impossible task for decades. First solutions appeared only lately. I present all together six solutions (and one more that is not a solution), ...
    Posted to Dejan Sarka (Weblog) by Dejan Sarka on May 29, 2014
  • Utility Queries–Column Metadata

    Very often, I find myself wanting to query system metadata for columns. Some of the metadata is fairly easy to deal with, like if you want to find column names, just simply querying sys.columns is very straightforward.  But if you want to query data types, it gets stickier.  There are type types listed, one that is the declared type, and ...
    Posted to Louis Davidson (Weblog) by drsql on April 22, 2012
  • Denali Enhancement–Duplicate Key Error Message

    When I was editing my chapter on implementing a database, I noticed a really nice improvement in the error message I had from the previous edition of the book. Instead of just telling me that there was a value in my modification statement that duplicated an existing value (or multiple values affected by the statement), it told me the duplicated ...
    Posted to Louis Davidson (Weblog) by drsql on July 14, 2011
  • Saving the whole team of players or nothing

    Suppose that you need to store teams of players, and you must enforce the following business rule: each team must consist of exactly two players. I will demonstrate how you can use constraints to implement this rule. I haven't used this approach in production yet, but I wanted to share an interesting idea. Of course we typically use triggers or ...
    Posted to Alexander Kuznetsov (Weblog) by Alexander Kuznetsov on July 15, 2009
  • Free e-Book! Jacob Sebastian's "The Art of XSD"

    SQL Server MVP Jacob Sebastian's new e-book, The Art of XSD, is available as a free download from Red Gate software at http://www.red-gate.com/specials/Ebooks/XSD_0409.htm. You may reognize Jacob from his many XML-related articles on SQL Server Central (http://www.sqlservercentral.com/Authors/Articles/Jacob_Sebastian/212008/). This book allows him ...
    Posted to Michael Coles: Sergeant SQL (Weblog) by Mike C on April 25, 2009
  • Business Rule Enforcement

    I know this is a topic that could cause a few heads to spin around uncontrollably if taken the wrong way, but I preserve.  Today I was having a conversation with an end user, an influential one at that, about a business rule that was needed for the time entry system we are putting together (and no comments on make/buy decisions, no way I ...
    Posted to Louis Davidson (Weblog) by drsql on February 16, 2009
  • Can you trust your constraints?

    SQL Server allows you to temporarily disable your CHECK and FOREIGN KEY constraints. I would not recommend this as part of your regular production schedule, but there are certainly cases where this comes in handy.   One example is if you’re copying thousands of rows from another table, and you already know with 100% certainty that the data ...
Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement