Regular Expressions 101

Community Patterns

sql default constraints

0

Regular Expression
PCRE (PHP <7.3)

/
IF NOT EXISTS \(SELECT \* FROM sys\.objects WHERE object_id = OBJECT_ID\(N'\[(.*?)\]\.\[(.*?)\]'\) AND type = 'D'\) BEGIN ALTER TABLE \[(.*?)\]\.\[(.*?)\] ADD DEFAULT \(\((.*?)\)\) FOR \[(.*?)\]
/
gm

Description

Loading markdown...
Submitted by anonymous - 4 years ago