Thursday , October 18 2018
Home / DataBase / SQL SERVER / Create Default Constraint in Sql Server

Create Default Constraint in Sql Server

Create Default Constraint in Sql Server

Default Constraint:-It is useful to provide default value into a column when user will not provide any value while inserting the data into the table then default value will be arranged.

Column Level Definition: In this case the constraint definition is immediately followed after the column definition.

The syntax is:

Example:-

 

Note: In Table Level constraints DEFAULT and NOT NULL constraints are not allowed.

Print Friendly, PDF & Email

Give us your valuable feedback

comments

About Samba

Check Also

sql server backup script

Backup all databases in SQL Instance with one script

Backup: A copy of SQL Server data that can be used to restore and recover the …