Sql Default Constraint

When we need to set a Default Value for Particular Column,if user not want to enter a value for that column then we give it to a Default Constraint.

Example Shows Setting Default for Numeric value, Sysdate and Alpha-numeric Value.

 create table exam(  
 id number(6) Default 10,  
 Hdate date Default sysdate,  
 email varchar2(20) Default 'user@mail.com'  
 );  

No comments: