Tuesday , June 19 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

Find all rows count and columns count in single database in sql server

In General for any database it contains lot of tables, if we want to find …

%d bloggers like this: