Toad World® Forums

How to specify a column default name?

Hi All,

With Toad Data Modeler 5.4, in a model for SQL Server 2014, I’ve specified the “GETDATE()” T-SQL function as a default for a table column. Naturally, the following code is generated for that column in the create table statement:

, [Created_Date] Datetime DEFAULT GETDATE() NOT NULL

I would prefer the constraint be created with a name, inline if required, such as:

, [Created_Date] Datetime NOT NULL CONSTRAINT df_Created_Date DEFAULT GETDATE()

Is there some way to make this happen? Our DBA despises auto-generated object names.

Thanks,
Eric B.

Hi Eric,

you have to specify name of the default constraint. Open the attribute properties, set the default value, go to the group box "Other Database specific" and specify the name of the default value constraint.

Regards,

David

Thanks, David, I was looking in the wrong place. I’ve neglected some areas of this tool for too long. Much appreciated.