Is there a way to drop a PK from a table by selecting the name into a variable from all_constraints, I need to run this script on multi databases that the actual name of the PK could possibly be different.
I can get the name in a variable but don't know how to execute,
since an ALTER TALBE is not valid in the execute section.
DECLARE
PKNAME CHAR(50);
CMD CHAR(300);
BEGIN
SELECT CONSTRAINT_NAME INTO PKNAME FROM ALL_CONSTRAINTS WHERE TABLE_NAME = 'APQUICKD' AND CONSTRAINT_TYPE LIKE 'U';
----can I build and execute a string here????
END;