I've got a table and I need to delete it's primary key unfortunately I don't know what the name of original constraint is. (Well, of course I can have a look and find out, but I'm doing this through code).
I'm looking for a statement similar to
(1)
ALTER TABLE blah
DROP PRIMARY KEY
but, this doesn't work
i can use
(2)
ALTER TABLE blah
DROP CONSTRAINT blahsprimarykeyconstraintname
and this works fine - getting the name of the constraint is the hard part (for me at least!)
I would prefer to use a generic solution like (1), but if you can lend a hand with (2) that would be great.
Thanks,
L