title: ms sql smo:how to script foreign key WITHOUT "Alter table MyTable check constraint MyForeignKey"
body: <p>I see server 2008 generated script:</p>
  
  <pre><code>ALTER TABLE [mytable]  WITH CHECK ADD  CONSTRAINT [fk_mytable_id] FOREIGN KEY([id])
  REFERENCES [mytable2] ([id])
  ON UPDATE CASCADE
  ON DELETE CASCADE
  GO
  ALTER TABLE mytable CHECK CONSTRAINT [fk_mytable_id]
  </code></pre>
  
  <p>Last statement is redundant, script works fine without it.
  I generate scripts of foreign keys using SMO and want to avoid the last string. Can I do it?</p>