Created
July 21, 2017 08:38
-
-
Save shaneis/c849161835381c18d4ee3de1c1ddb484 to your computer and use it in GitHub Desktop.
Old Style Adding Constraints
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE Pantheon; | |
GO | |
DROP TABLE IF EXISTS dbo.CreateThenAlter; | |
CREATE TABLE dbo.CreateThenAlter | |
( | |
RBAR char(10) | |
); | |
GO | |
ALTER TABLE dbo.CreateThenAlter ADD CONSTRAINT CHK_CreateThenAlter_RBAR CHECK (RBAR IN ('good', 'bad')); | |
ALTER TABLE dbo.CreateThenAlter ADD CONSTRAINT DF_CreateThenAlter_RBAR DEFAULT ('good') FOR RBAR; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment