Altova DatabaseSpy 2025 Professional Edition

Whenever you insert data into a column without supplying a value, a default constraint, if present, supplies a default value automatically. For example, a database could automatically generate the current date or time value for a data field whenever you insert a new record in a table. Any default constraint defines a value or expression that is to be used by default. This could be a string or numeric value, or an expression in the SQL grammar of the respective database (for example, a function call to get the current date or time).

 

In the Online Browser, columns that have a default constraint are shown with the dbs_ic_column_default  icon.

dbs_default_constraint_01

To view or edit the expression of the default constraint, first select the column, and observe the Default field in the Properties window.

 

In the Design Editor, default constraints appear in the "Constraints" section of a table design.

© 2018-2024 Altova GmbH