• I don't have a test setup here to quickly double-check, but if I read the documentation correctly the NOT FOR REPLICATION will not cause the constraint to exist only at the publisher. Here's the quote:

    "The check constraint is not enforced when a replication agent performs an insert, update, or delete operation."

    I interpret this as "the constraint itself is replicated to the subscriber and it will also be enforced there with respect to 'local' (manual) inserts and updates, but inserts and updates from a replication agent are explicitly exempted".

    Can someone who can easily create a test setup please double check if this is a documentation error, or just a badly formulated QotD?

    Oh, and Steve might also want to fix the two identical answer options in this question...


    Hugo Kornelis, SQL Server/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/