Home Forums SQL Server 2008 T-SQL (SS2K8) Having trouble finding the definition of a foreign key constraint RE: Having trouble finding the definition of a foreign key constraint

  • I don't think that's what the error's saying. If you tried to create a foreign key constraint that already existed (their names have to be unique, you can have multiple on the same table and column), you'd get:

    Msg 2714, Level 16, State 5, Line 1

    There is already an object named 'Grievance-Grv_Step' in the database.

    Check the tables and see whether there's data in the tables that would violate the constraint you're trying to create.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass