3
Reply

What are defaults? Is there a column to which a default can't be bound?

Sapna Malik

Sapna Malik

15y
9.9k
0
Reply

    hi,

    Defaults are the user defined constraints. Their role is to insert a default value to a column if that column contains only 'null' value at the time of insertion.
    Defaults cannot be defined for primary key column, unique key column, identity columns.
    Thank you. 

    Also, DEFAULTS cannot be applied to TIMESTAMP column.

     

    The DEFAULT constraint is used to insert a default value into a column, when no value is specified in the INSERT statement. DEFAULTS are created using CREATE TABLE or ALTER TABLE statements. The DEFAULT can't be bound to an IDENTITY column.