Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Rename a constraint
You need to parse and look at the results set from a select from
USER_CONSTRAINTS. Yes, it's stupid but Oracle does not give you any help if you
let Oracle pick the constraint name (SYS_x). And an even worse design issue -
you cannot alter a column constraint, you first have to drop the old one and
create a new one. And then you also first have to find the
constraint name SYS_x. Not good design by Oracle.
Johan Thorselius
Syarzhuk Kazachehnka wrote:
> gennick_at_worldnet.att.net wrote:
> > >Is there a way to rename a constraint in Oracle using SQL ? I need
> > >to rename the system generated constraint to a different name.
> >
> > No. You need to drop and recreate the constraint.
> How do I retrieve the name of a system generated constraint? I have a table
> created with:
> CREATE TABLE Tablename(
> ...,
> FieldName VarChar(50) UNIQUE,
> ...
> );
>
>
>
>Received on Wed Jan 06 1999 - 17:02:36 CST
> -----------== Posted via Deja News, The Discussion Network ==----------
> http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
![]() |
![]() |