Hi all,
Database: SQL Server 2000 SP3a, front end application created with
Visual FoxPro 8 SP1.
To my surprise, I found out that somehow, *all of* my tables have lost
their Primary Keys and Foreign Key assignment. While the apps still runs
okay (because the Identity still intact, hence all insertions run as
they should be and I don't use any SPs to maintain business rules), I
understand clearly that this is something I *must* fix immediately.
I used to create the relationship and maintain DELETE constrain in Edit
Diagram window found on the MS Enterprise Manager. Since I have to
recreate all relationship and constrain all over again, it's going to
take some time if I use diagram.
QUESTION:
I know that instead of using diagram, I can use T-SQL statement via
Query Analyzer, can anybody give me a clue how to add the constrain?
There are about 90 tables on the database and I have to fix five
databases with the same problem (and the same structure).
TIA,
Willianto