Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: sql statement ERROR please help......

Re: sql statement ERROR please help......

From: Noel <tbal_at_inchrosoft.com.pl>
Date: Sat, 21 Jul 2001 21:28:25 GMT
Message-ID: <3b440f9e@news.vogel.pl>

Yes, you only can change constraint_state in alter table modify constraints.. clause.
BUT if you really need to change that in one SQL here there is:  (connect as user who got privileges to sys obj)

UPDATE sys.cdef$

   SET condition = New_Codition_Here
 WHERE con# = (
   select c.con#
     from sys.obj$ o, sys.cdef$ c, sys.con$ oc     where c.obj# = o.obj#

      and o.name = 'TTT'
      and oc.name = 'E'
      and oc.con# = c.con#
     );

Have Fun.

U¿ytkownik "Sybrand Bakker" <postbus_at_sybrandb.demon.nl> napisa³ w wiadomo¶ci news:tk6o36hpr5h2c1_at_beta-news.demon.nl...
>
> "penny" <boy_66_at_hotmail.com> wrote in message
> news:a7c8116a.0107040956.24128126_at_posting.google.com...
> > Hi all,
> >
> >
> > I am using Oracle8i Enterprise Edition in window 2000
> >
> > my problem as following
> >
> >
> >
> > ~~~~~~~~~~~~~~~~~~~~~
> >
> > SQL> create table ttt
> > 2 ( name varchar2(100)
> > 3 ,
> > 4 constraint e check (name = lower(name)));
> >
> > Table created.
> >
> > SQL> alter table ttt
> > 2 modify constraint e
> > 3 check (name = upper(name));
> > check (name = upper(name))
> > *
> > ERROR at line 3:
> > ORA-00933: SQL command not properly ended
> >
> >
> >
> > How can I modify constraint e ????
> >
> > thanks.
>
>
> You can't
> You need to drop the constraint and recreate it.
> Please try to consult the sql reference manual before posting these typing
> of questions.
>
> Regards,
>
> Sybrand Bakker, Senior Oracle DBA
>
>
>
Received on Sat Jul 21 2001 - 16:28:25 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US