Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rename a constraint
Johan Thorselius <johan.thorselius_at_outright.se> wrote:
> You need to parse and look at the results set from a select from
> USER_CONSTRAINTS.
Thank you, it worked.
Now I just encountered a strange thing: If I say:
SELECT COUNT(*) FROM USER_CONSTRAINTS WHERE table_name='QUESTION'; Oracle gives me the correct answer: 2
If I say:
SELECT * FROM USER_CONSTRAINTS WHERE table_name='QUESTION'; Oracle gives me 3 rows in result set!
The last row shows constraint_name SYS_C00818 and " NO ACTION ENABLED" where Constraint_type, table_name, etc. should go SYS_C00818 is actually a constraint defined on another table! It only happens when I do SELECT * FROM USER_CONSTRAINTS, everything is fine when I spell out the fields.
What is the reason for this strange behaviour?
Syarzhuk
-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Thu Jan 14 1999 - 10:39:46 CST