| What is the default constraint in SQL
First we will take basic definition of constraint it is used to specify the some sort of rules to process data and do some limitation to the data that will go to tables. Now comes to default constraint in sql.
There are certain condition when we need to put some default values to a specific column. And that values will be added to that column when no values is added in that column then default values is automatically put in that column.
SQL Syntax:-
create table stu1(col_id int, col1 varchar(20), col2 int default 50) | | |