Finding Table Constraints

  • Does anyone know how to find out the contraints which link tables in mssql using php? And then to remove them?

    I am making a database website for someone and i had to delete the constriants using SQL Server Studio and i am worried about them returning and them being unable to use the database becuase the functions that error when a constraint is met cannot find and delete these constraints automatically.

  • Constraints are meant to protect the data.... little things like Primary Keys and Foreign keys as well as some data level constraints in columns keep people from entering garbage into a database. You need to program you PHP to respect those constraints. If the constraints were incorrectly added to the database, then deleting them as you did should be enough. If someone adds a constraint, you need to repect that constraint in your PHP.

    Talk with the DBA...

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 2 posts - 1 through 2 (of 2 total)

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