Constraint Name in the Generated SQL

  • When using enterprise manager to generate SQL for some Databases it includes the constraint names for foreign and primary keys.  On other databases it does not.  How can I consistenly get the constraint names included in the generated SQL?

     

     

    David Bird

  • This was removed by the editor as SPAM

  • I don't know of a *general* setting for this. Are you sure you always check this option when generating a script?

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • I did some playing around and found when I specified a constraint name when creating the foreign key or primary key.  Enterprise Manager would generate the SQL with the constraint name.

    When I did not specify a constraint, sql server would generate a constraint name.  Some how Enterprise manager would know the name was generated and would not include it in the generated SQL.

    Thats for your time.

     

     

    David Bird

  • Might be another reason to stay away from EM

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply