Just discovered something strange. If you write a stored proc in Enterprise Manager to create a primary key, click Check Syntax and then OK, the PK is created!
In other words, "Create Procedure" seems to be running it as well with no rollback. This is a bit of a pain if you're into the old iterative build-check-test routine.
I know DDL in a stored proc is uncommon, but couldn't avoid it here. My table is for a data load from an Excel file. In-house rules require a PK, but the load may contain null rows. I wanted to disable the PK (can do this in Oracle), so tried ALTER TABLE ALTER COLUMN... NO CHECK but I suppose the NOT NULL and PPK constraints have lives of their own. Hence went for drop / recreate as the next easiest option and discovered the oddity above. Can anyone tell me why this isn't a bug?