Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Constraint Name: Please Help

Hi.

How do I retrieve the constraint name of an existing constraint between two tables so that I can remove that constraint and create a new constraint?

My problem below:

'//get existing constraint_name ??
adoTOOLSHED.Execute "ALTER TABLE MyTable DROP CONSTRAINT constraint_name"

adoTOOLSHED.Execute "ALTER TABLE MyTable ADD CONSTRAINT fk_agentOffice FOREIGN KEY (agentID, officeID) REFERENCES MyOtherTable (agentID, officeID) ON UPDATE CASCADE ON DELETE CASCADE;"

Regards,

^J^
Sign In or Register to comment.