0

I would just like to ask what is the difference between user_constraints and user_objects.

I have two databases and run a script on both DB that resulted a unique constraint error.

To solve the problem I deleted the constraint on user_constraint table for both DB. After that DB1 run without error. DB2 however failed, I checked the user_constraint for both db and the constraints was deleted.

I was asked to check the user_objects and found that DB2 has that same constraint_name as the object_name in the user_objects table.

Any info regarding their relationship, use, similarites, etc will be appreciated.

Thanks..

Ollie
  • 17,058
  • 7
  • 48
  • 59
mysticfalls
  • 445
  • 5
  • 17
  • 28

1 Answers1

0

The constraint should be dropped with:

Alter table table_name drop constraint constraint_name;

The difference is simple: User_objects contains all the objects in database and user_constraints contains only the constraints.

Florin Ghita
  • 17,525
  • 6
  • 57
  • 76