KrisSimonis
Programmer
I've got the following PL/SQL code:
DECLARE
counter NUMBER(4);
BEGIN
SELECT count(*) INTO counter from all_constraints where constraint_name = 'FK_persoon_afdelingid';
IF counter > 0 THEN
ALTER TABLE PERSOON
DROP CONSTRAINT FK_persoon_afdelingid;
END IF;
END;
Basicly, seek and destroy a foreign key in a table.
( the whole thing is dynamicly created inside my application and then submitted to the Database )
However, when I try to run it, it gives the following
error in the worksheet( in my application I just get ORA-6550 exception ):
-------------------------------------
ALTER TABLE PERSOON
*
ERROR in line 6:
.ORA-06550: Line 6, Column 2:
PLS-00103: Symbol "ALTER" found while expecting:
( bunch of other command words )
Can anyone give me a hand on how to solve this problem?
Kris Simonis
OGD Software.
DECLARE
counter NUMBER(4);
BEGIN
SELECT count(*) INTO counter from all_constraints where constraint_name = 'FK_persoon_afdelingid';
IF counter > 0 THEN
ALTER TABLE PERSOON
DROP CONSTRAINT FK_persoon_afdelingid;
END IF;
END;
Basicly, seek and destroy a foreign key in a table.
( the whole thing is dynamicly created inside my application and then submitted to the Database )
However, when I try to run it, it gives the following
error in the worksheet( in my application I just get ORA-6550 exception ):
-------------------------------------
ALTER TABLE PERSOON
*
ERROR in line 6:
.ORA-06550: Line 6, Column 2:
PLS-00103: Symbol "ALTER" found while expecting:
( bunch of other command words )
Can anyone give me a hand on how to solve this problem?
Kris Simonis
OGD Software.