Toad World® Forums

Generate DDL to name FKs?


By default TOAD seems to generate DDL for foreign key relationships, with this syntax:

alter table XX
add foreign key (colA)
references table ZZ (colB)

But, I want to be able to explicitly NAME the FK constraint, hopefully using the name I’ve give n the relationship in the model! Something like

alter table XX
add constraint XX_good_name
foreig n key (colA)
references table ZZ (colB)

Is it possible to configure the SQL generation tool to do that?

thanks in advance



can you send me a sample model to please? I’d like to know what database system you use etc.

Thank you,



Well, the obvious answer is just to check the “Generate Constraint Names” option on the Detail Settings tab of the Generate DDL window.