Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: PL/SQL and alter table
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
![]() |
![]() |