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

Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL and alter table

Re: PL/SQL and alter table

From: rkajda <rkajda_at_ComArch.pl>
Date: Mon, 08 Feb 1999 10:51:06 GMT
Message-ID: <36BEC0F0.FB224718@ComArch.pl>


Hi
You can use dbms_sql package

for exapmle
declare
  vi_cursor integer;
  vi_rp integer;
begin
  vi_cursor := dbms_sql.open_cursor;
  dbms_sql.parse( vi_cursor , 'alter your table or any statement' , dbms_sql.v7 );
  vi_rp := dbms_sql.execute( vi_cursor );   dbms_sql.close_cursor( vi_cursor );
end;
or
if you are using Forms you can write only forms_ddl( 'alter your table' );

Jurgen Roeland wrote:

> Is it possible to write an ALTER TABLE statement dropping a constraint
> in a PL/SQL procedure ? And if not, what is the alternative.
>
> I want to update a part of my primary key which is a reference twice to
> another table through foreign key. I want to update this part of the key
> to a new value.
> So I would like to drop the foreign key constraints, update and then put
> them back.
> However I keep getting PLS-00103: Encountered the symbol "ALTER" when
> expecting one of the following:.... from the compiler.
>
> What am I doing wrong here ?
>
> Jurgen Roeland


Received on Mon Feb 08 1999 - 04:51:06 CST

Original text of this message

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